Pipeline Features
The functions in this section are used to create and work with pipeline features. These functions also allow a Creo TOOLKIT application to create, read, and write line stock information.
Functions introduced:
The function ProPipelineSpecDrivenCreate() creates line stock and pipeline features according to the specification parameters defined in the structure ProPipingSpecParams. The pipeline feature is created using the newly created line stock feature. The name of the line stock feature is generated based on the specification parameters. The name of the pipeline feature is generated based on the specification parameter and the configuration option pipeline_label_format.
The input arguments are:
model—Specifies the model where the pipeline feature must be created. The model must be Specfication-Driven, or the configuration option piping_design_method must be set to spec_driven.
The configuration option piping_design_method enables you to set the design mode for the piping project. To activate the Spec-Driven design mode set the value of the configuration option to spec_driven. In this mode, the piping systems are created using the specified specifications. For Non Spec-Driven mode, set the value to non_spec_driven. In this mode, the piping systems are created manually without using project-specific data. To work in the User-Driven mode, set the value to user_driven. This mode enables you to switch between Spec-Driven and Non Spec-Driven piping design modes. You can convert existing assemblies to required design mode at any time in the design process.
spec_params—Specifies the specification parameters. These parameters are defined in the structure ProPipingSpecParams. User must set the parameter values in the structure based on the values defined in the auto-selection file. Refer to the Creo Parametric Piping Help for more information on the auto-selection files.
Mnemonic—Specifies the fluid or piping system. If the value is specified as NULL, then the default mnemonic defined in the Specification Directory file is used. The path and name of the Specification Directory file are set in the configuration option piping_spec_dir_file. If you pass an empty string, then no mnemonic value is assigned to the pipeline feature.
number—Specifies a number which uniquely identifies the pipeline. If the value is specified as NULL or an empty string, then no number is assigned to the pipeline feature.
insulation—Specifics the insulation for the pipeline. If the value is specified as NULL, then the default insulation defined in the Specification Directory file is used. The path and name of the Specification Directory file are set in the configuration option piping_spec_dir_file. If you pass an empty string, then the pipeline feature is created without insulation.
CreateSubAsm—Specifies if the pipeline must be created as a new subassembly. The pipeline subassembly is created using the template model defined in the configuration option pipeline_start_assembly_name.
SubAsmName—Specifies the name of the pipeline subassembly. If you pass the value of the argument as NULL or an empty string, then the name of the pipeline subassembly is generated based on the configuration option pipeline_assembly_name_format.
csys_reference—Specifies a coordinate system for the placement of the pipeline subassembly. If the value is specified as NULL, then the coordinate system of the model is used to place the subassembly.
The function ProPipelineCreateFromXML() creates line stock and pipeline features according to the schematic information defined in the XML file for the specified pipeline label. The name of the line stock feature is generated based on the specification parameters. The name of the pipeline feature is generated based on the specification parameter and the configuration option pipeline_label_format.
The input arguments are:
model—Specifies the model where the pipeline feature must be created. The model must be Specfication-Driven, or the configuration option piping_design_method must be set to spec_driven. The model must be enabled for schematic-driven modeling. The configuration option piping_schematic_driven must be set to yes.
The configuration option piping_schematic_driven enables or disables the schematic-driven modeling mode for a piping project. The valid values are yes and no.
xml_file—Specifies the path to the XML file which contains schematic information for pipelines.
pipeline_label—Specifies the pipeline label for the XML file. The properties SPEC, SIZE, SCHEDULE, MNEMONIC, NUMBER, and INSULATION associated with a pipeline label are updated from the XML file. The property GRADE, that is, the material code is updated based on the other specification parameters. The property CATEGORY has its value set as PIPE.
insulation—Specifics if the pipeline must be created with insulation. If the value is specified as TRUE, then the pipeline is created with insulation based on the parameter INSULATION defined in the XML file.
CreateSubAsm—Specifies if the pipeline must be created as a new subassembly. The pipeline subassembly is created using the template model defined in the configuration option pipeline_start_assembly_name.
SubAsmName—Specifies the name of the pipeline subassembly. If you pass the value of the argument as NULL or an empty string, then the name of the pipeline subassembly is generated based on the configuration option pipeline_assembly_name_format.
csys_reference—Specifies a coordinate system for the placement of the pipeline subassembly. If the value is specified as NULL, then the coordinate system of the model is used to place the subassembly.
The function ProPipelineCreate() creates a Non Specification-Driven pipeline feature. The pipeline is created under the specified model. The input arguments are:
model—Specifies the model where the pipeline feature must be created. The model must be Non Specfication-Driven.
lnstk—Specifies the line stock feature. The line stock feature must have the specified model as its parent.
pipeline_name—Specifies the name of the pipeline feature.
The function ProPipelineParametersCollect() retrieves all the parameters of the specified pipeline as a ProArray. Use the function ProArrayFree to release the memory assigned to the ProArray of parameters.
Use the function ProPipelineParametersSet() to set the parameters in the specified pipeline.
The function ProPipelineParameterAdd() adds the parameter in the specified pipeline.
The function ProPipelineParameterDelete() deletes the parameter in the specified pipeline.
In this section, we have explained only the configuration options which are required to work with the piping APIs. Refer to the Creo Parametric Piping Help for the complete list of piping configuration options and their detailed descriptions.
Was this helpful?