ParamFormUI utilities

These functions of ParamFormUI are relevant for defining the properties of parameters in scripts that build structural units.

FrmNumericParameterDefine( string dty, params, string abr, string dsc, min, max, int np )

Define a numeric parameter. Integer and float data types supported.

Input:

dty

Data type

params

Array of parameters

abr

Abbreviation, max 3 character tag

dsc

Description

min/max

Value range

np

A row index to the parameter property definition table

FrmQuantityParameterDefine( params, string abr, string dsc, float f_min, float f_max, int quantity_id, int np )

Define a quantity type parameter.

Input:

f_min/f_max

Value range

quantity_id

The ID of the quantity

FrmStructuralParameterDefine( params, string abr, string dsc, int opt, int np )

Define a parameter whose value is a structural GDL. It is mandatory to assign the COS attribute 'Description' to it.

Input:

opt

TRUE – Value is optional (empty is accepted)

FALSE – Value is mandatory

FrmPartIdParameterDefine( params, string abr, string dsc, string corp_kw_query, int opt, int np )

Define a parameter whose value is a valid Datamatic PartId (PID).

Input:

corp_kw_query

A query string the part is searched with from the part catalog

FrmPartCodeParameterDefine( params, string abr, string dsc, string corp_kw_query, int opt, int np )

Define a parameter whose value is a valid Datamatic Part Code.

FrmEmbeddedMaterialParameterDefine( params, string abr, string dsc, string corp_kw_query, int opt, int np )

Define a parameter whose value is "embedded material". This is a combination of a PartId (PID) and the associated quantity (pieces). Typically used for example for bolts, nuts, and washers (not modeled as separate 3D objects) for BOMs.

FrmEmbeddedMaterialValueUnpack( string value, string pid, int pieces )

Unpack the PID string and the (pieces) integer value from the value packed by FrmEmbeddedMaterialParameterDefine.

Input:

pid

The Datamatic PartId (PID)

pieces

Quantity

FrmBeamParameterDefine( params, string abr, string dsc, int opt, int np )

FrmPipelineSpecParameterDefine( params, string abr, string dsc, int opt, int np )

Define a parameter which combines a pipeline with its specification.

FrmPipelineSpecValueUnpack( string value, string pipeline_oid, string pipeline_id, int spec_ordinal )

Unpack pipeline and specification data from the value packed by FrmPipelineSpecParameterDefine.

Input:

value

The packed value of pipeline + specification

pipeline_oid

The COS object id of the pipeline object

pipeline_id

Id of the pipeline

spec_ordinal

The ordinal number of the spec in the pipeline definition (1–3 specs)

FrmStringParameterDefine( params, string abr, string dsc, int max_length,int opt,int np )

Define a text string type parameter.

Input:

max_length

The maximum length of the string value

FrmChoiceParameterDefine( string dty, params, string abr, string dsc, int n_choices, handle choices, int np )

Define a choice type parameter.

Input:

n_choices

The number of choice items

choices

An A_ALLOC array of choice items

FrmSystemNameParameterDefine( params, string abr, string dsc, int ssa, int opt, int np )

Define a parameter whose value is the name of a System.

Input:

ssa

Dummy

FrmParameterPropertySet( param_id, params, string property_name, string property_val )

Assign some property to an already defined and allocated parameter.

Input:

param_id

Index to the array of parameter definitions

params

Array of parameter definitions

property_name

Abbreviation (tag) of the property

property_val

Value of the property

FrmParameterDefinitionsFree( params )

Free allocated memory.

params

Allocated array of parameter definitions

FrmParameterIndexGetViaAbbreviation( int n_params, handle params, string abr )

Return the index of the parameter definition via the abbreviation.

FrmParametersSetDefaults( handle values_trh, int n_params, handle params )

Set the parameter values to default.

Related Topics

Implementing a custom template