Mass Properties Management | Open the Mass Properties Management form by selecting it from the MSC SuperModel main menu. Set the Action to Create and Object to Mass Prop Region. Select the By Groups method. |
Group | Select the groups from which the mass properties regions are to be created in the Group frame. |
Description | Enter a description of the Mass Properties Region in the Description listbox. |
Mass Factors | Enter the factors in the Mass Factors scroll frame. For each mass factor, select the Enter Value option and enter the value of the factor in the databox. The Parameter List option is available only if the Mass Properties function has been customized by the user (see Mass Properties Customization and Mass Factor Customization sections). The date and time the factor was entered are recorded automatically. |
Accept | Select Accept to create the Mass Properties Region. The Mass Properties Region always has the same name as the group from which it was created. |
Mass Properties | Open the Mass Properties Management form by selecting it from the MSC SuperModel main menu. Set the Action to Create and Object to Mass Prop Region. Select the By Selection method. |
Mass Properties Region | Enter the Mass Properties Region name in the Region Name databox. |
Region Definition | Select the Region Definition button to display a subform which are used to select the groups which are used to create the Mass Properties Region. |
Groups | Select the groups which comprises the Mass Properties Region from the Groups listbox in the Define Region subform. Select OK to accept the groups selected. |
Description | Enter a description of the Mass Properties Region in the Description listbox. |
Mass Factors | Enter the Mass Factors in the Mass Factors scroll frame. For each mass factor, select the Enter Value option and enter the value of the factor in the databox. The Parameter List option is available only if the Mass Properties function has been customized by the user (see Mass Properties Customization and Mass Factor Customization sections). The date and time the factor was entered and recorded automatically. |
Accept | Select Accept to create the Mass Properties Region. |
Mass Properties | Open the Mass Properties Management form by selecting it from the MSC SuperModel main menu. Set the Action to Modify and Object to Mass Prop Region. |
Mass Properties Region | Select the Mass Properties Region which is to be modified. |
Region Definition | Select the Region Definition button to bring up a subform which allows you to change the group or groups from which the region is created. Groups can be added to or removed from the Mass Properties Region. |
Mass Factors | Use the Mass Factors scroll frame to change the Mass Factors. For each mass factor to be changed, select the Enter Value option and enter the new value of the factor in the databox. The Parameter List option is available only if the Mass Properties function has been customized by the user (see Mass Properties Customization and Mass Factor Customization sections). The date and time the factor was changed are recorded automatically. The Mass Properties Region description cannot be changed. |
Accept | Select Accept to modify the Mass Properties Region. |
Mass Properties | Open the Mass Properties Management form by selecting it from the MSC SuperModel main menu. Set the Action to Delete and Object to Mass Prop Region. |
Mass Properties Region | Select the Mass Properties Region which is to be deleted. |
Accept | Select Accept to delete the Mass Properties Region. |
Mass Properties | Open the Mass Properties Management form by selecting it from the MSC SuperModel main menu. Set the Action to Apply and Object to Mass Factors. |
If desired, select Elements Must Have Factors in the Application Options: frame. Weights can be changed only by using Nonstructural Masses. | |
Accept | Select Accept to apply the Mass Factors. |
Mass Properties | Open the Mass Properties Management form by selecting it from the MSC SuperModel main menu. Set the Action to Delete and Object to Mass Factors. |
Accept | Select Accept to delete the Mass Factors. |
Mass Properties | Open the Mass Properties Management form by selecting it from the MSC SuperModel main menu. Set the Action to Show and Object to Mass Prop Region. |
Mass Properties Region | Select the Mass Properties Region which is to be displayed. |
Region Definition | Select the Region Definition button to bring up a subform which displays the group from which the region is created. |
Mass Factors | Use the Mass Factors scroll frame to view the Mass Factors. The date and time the factor was created or changed are displayed |
#include massprop_appstrings.p
#DEFINE CLASSNAME user_algname
#DEFINE CLASSNAME_QUOTED "user_algname"
CLASS CLASSNAME
/*
* The algorithm data management class handles all work
* involved in storing and retrieving data associated with
* an algorithm and its associated parameter lists. It:
* - registers its availability and associated factor
* types in a registry class
* - interacts with the GUI used to set up the parameter
* lists to store and retrieve list instances
* - calculates and stores mass factors at the request of
* the mass region, via a "registry class"
* - gives a list of available parameter lists, at the
* request of the mass region via a "registry class"
* - provides mass factors as requested
*/
FUNCTION init()
/*
* Purpose:
* - Register algorithm in registry class:
* - Register types of factors in registry class
* - Create user data templates, if they don’t exist
*
* Input:
* (none)
* Output:
* (none)
*
* Side Effects:
* - Lets mass region GUI know that a new algorithm is
* available, and will thus appear on the list of available
* algorithms.
* - Sets up templates for later data storage
*
* External Dependencies:
* Need user data functions to store data
* Need registry class to keep track of available
* algorithms.
*
* General Description:
* To be called in the init.pcl when starting up PATRAN,
* or any other customized PATRAN initialization
*/
REGISTER_CLASSNAME.register_alg( @
/* algorithm name STRING */ algorithm_name, @
/* current class name STRING */ CLASSNAME_QUOTED)
REGISTER_CLASSNAME.register_asg( @
/* algorithm name STRING */ algorithm_name,@
/* factor types STRING ARRAY */ fact_types,@
/* number factor types INTEGER */ num_types)
IF( !template exists) ud_create_template(...)
END FUNCTION /* init */
/*
* A series of routines will follow here to manage the
* data, as needed by the GUI and the various templates
* associated with the algorithm. At minimum, this
* will include store,delete, and get functions for the
* parameter list.
*/
FUNCTION store_data
END FUNCTION /* store_data */
FUNCTION delete_data
END FUNCTION /* delete_data */
FUNCTION get_data
END FUNCTION /* get_data */
FUNCTION calculate_factors ()
/*
* Purpose:
* - Needed only if it is necessary to be able to
* initiate factor calculation from the mass region
* form.
* - Calculate massproperty factors
* - Store factors in the parameter list used to
* calculate them
*
* Input:
* (none)
* Output:
* (none)
*
* Side Effects:
* - Modifies parameter list instance
*
* External Dependencies:
* - Called by mass region class
* - Calls routine in mass region class to get current
* instance
*
* General Description:
* The calc factors function is called by the Mass Properties
* region when a factor is needed, using
* ui_exec_function(smdl_algname,"calculate_factors").
* It calls back to the Mass Properties region to get the
* name of the instance for which the factor is to be
* calculated, and then calls the algorithm to calculate
* the factors. It stores the factors in the parameter
* list once they are calculated.
*/
smdl_mass_region.give_current_instance(current_instance)
/*
* Calculate factors using whatever functions are needed.
* This can be done here or another call can be made.
*/
/*
* Store factors in the parameter list. As with
* calculation, this can be done here or in another
* function, e.g. the calculation function.
*
* The class that calls this function can then get the
* factor through the registry class and the send_factor
* function in this class.
*/
END FUNCTION /* calculate_factors */
FUNCTION send_factor ()
/*
* Purpose:
* - Provide Mass Properties factors to registry class
*
* Input:
* (none)
*
* Output:
* (none)
*
* Side Effects:
* (none)
*
* External Dependencies:
* Called by registry class. Uses functions in that class:
* give_param_list -- gets instance name for which factors
* are needed
* receive_factors -- sends factors back to registry class
*
* General Description:
* Factors will be given to the Mass Properties region
* via a call to the registry function. The mass region
* will make a call like:
* ui_exec_function(ALG_CLASS,send_factor)
* This class then gets the param list name from the
* registry class, retrieves factors for that list, and
* sends the factors back to the regisrty class.
* The registry class then provides the factor to the
* requesting function.
*/
REGISTER_CLASSNAME.give_param_list(instance)
/*
* from the specified instance, get the factors
*/
ud_get_instance(template,instance,r_data,s_data)
factor=r_data
date=s_data(n)
REGISTER_CLASSNAME.receive_factors(factor_array,date)
END FUNCTION /* send_factor */
FUNCTION give_lists ()
/*
* Purpose:
* - Provide to registry class a list of available instances
* for algorithm
*
* Input:
* (none)
*
* Output:
* (none)
*
* Side Effects:
* - Registers list of parameter list instances
*
* External Dependencies:
* Called by registry class
*
* General Description:
* This function gets a list of the current instances and
* registers it in the registry class. It is called by
* the registry class when a request is made to it for
* a list.
*/
ud_get_all_instances(template, list, num)
REGISTER_CLASSNAME.register_lst(algname, list, num)
END FUNCTION/* give_lists*/
END CLASS /* smdl_algname */
FUNCTION smdl_uil_massprop_setup(num_props,names)
$
$ Purpose:
$ Establish the number and names of mass factors
$
$ Input:
$ <none>
$
$ Output:
/* Number of mass factors */ INTEGER num_props
/* Names of the mass factors */ STRING names[]()
$
$ Side Effects:
$
$ External Dependencies:
$
$ General Description:
$
$ Notes:
$ Mass factor names must be 32 characters or fewer
$
INTEGER retval = 0
write("Initializing Mass Factor variables")
/*
* Change this number to increase the number of factors
* The maximum number of factors is 10
*/
num_props = 3
IF ( num_props <= 0 ) THEN
retval = -1
ELSE
sys_allocate_array(names,1,num_props)
/*
* The number of names should correlate with num_props
*/
names(1) = "- Factor #1 -"
names(2) = "- Factor #2 -"
names(3) = "- Factor #3 -"
END IF
RETURN retval
END FUNCTION