Linestock Parameters
Functions introduced:
ProLnstkParametersCollect()
ProLnstkParametersSet()
ProLnstkParameterAdd()
ProLnstkParameterDelete()
The parameters of a linestock differ from regular parameters in that they may be organized hierarchically. The data structure ProLnstkParam contains the description of a linestock parameter and its member parameters, if any. Its declaration follows, along with those of its member types.
typedef enum
{
PROLNSTKPRM_SINGLE,
PROLNSTKPRM_MULTIPLE
} ProLnstkParamType;
typedef struct _pro_lnstk_param_memb_
{
ProName name;
ProParamvalue value;
} ProLnstkParamMemb;
typedef struct _pro_lnstk_param_
{
ProName name;
ProLnstkParamType param_type;
union {
ProParamvalue value;
ProLnstkParamMemb *members;
} lnstk_param_value;
} ProLnstkParam;
The function ProLnstkParametersCollect() finds all the parameters for a specified linestock.
The function ProLnstkParametersSet() sets the parameters on a specified linestock to a specific list.
The function ProLnstkParameterAdd() adds a new parameter to the list of parameters on a specified linestock.
The function ProLnstkParameterDelete() deletes a named parameter from a linestock.
The linestock parameters can be set using the following enumerated types:
ProLnstkPipeSection—Specifies the type of the pipe section as Hollow or Solid.
ProLnstkPipeShape—Specifies the type of the pipe shape as Flexible or Straight.
ProLnstkPipeCrnrType—Specifies the type of the pipe corner as Bend, Fitting, or Miter Cut. Corners are not set for flexible pipes.
ProLnstkPipeXSection—Specifies the cross section of the pipe as Circular or Rectangular.
For round pipes the value of ProLnstkPipeXSection is set to PROLNSTKPIPEXSECT_CIRCULAR. Use the function ProLnstkParametersCollect() to access the values of the following pipe section parameters:
OD—Outer diameter of the pipe.
WALL_THICKNESS—Wall thickness of the pipe.
For rectangular pipes the value of ProLnstkPipeXSection is set to PROLNSTKPIPEXSECT_RECTANGULAR. Use the function ProLnstkParametersCollect() to access the values of the following pipe section parameters:
RECTANGULAR_HEIGHT—Height of the rectangular pipe.
RECTANGULAR_WIDTH—Width of the rectangular pipe
RECTANGULAR_ANGLE—Rotate angle of the pipe solid part around its reference entity. The angle is relevant only in square pipes.
WALL_THICKNESS—Wall thickness of the pipe.
這是否有幫助?