Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Toby Metcalf might want to move this to the correct forum
PTC Pro/Program Webinar - YouTube
When a Pro Program is edited the information will come from the file the first time. The editor will create a copy of the file program as-is for backup purposes. After that it will ask "From Model' or From File." If the last time turned out poorly, then 'From File' is your best choice.
When a program is run:
Any values in the program and not in the file are unchanged, any values in the file and not in the program are ignored.
Example file entries - one per line; case-sensitive
THICKNESS = 2.5
INCLUDE_VALVE = YES
MATERIAL = "STEEL"
/* < your comment
Place the comment immediately after an ADD to keep its place with the feature.
Types:
Must exist between INPUT and END INPUT.
Can use IF-ELSE-ENDIF
logical operations are >,<, ==; string literals are in quotes.
Get the name of the replacement from INPUT or via RELATIONS
Change the ADD PART to ADD PART (replacement) for part to part exchange
or
Change the ADD COMPONENT(replacement) for part to subassy exchange.
"COMPONENT" requires file extension, PART does not.
Must be between RELATIONS and END RELATIONS
XYZ = <parameter_name>:fid_<feature_name>:<comp_id>
or
XYZ = <parameter_name>:fid_<N>:<comp_id>
The format for lookup_inst is:
lookup_inst ("generic_name", match_mode, param_name_1, match_value_1, param_name_2, match_value_2,...)
where:
generic name—Name of the generic model with a .prt or .asm extension
match_mode—One of the following values:
–1 (find closest instance with param values less than or equal to supplied values)
0 (find instance with param values that match supplied values exactly)
1 (find closest instance with param values greater than or equal to supplied values)
param_name_1—Family table parameter name
match_value_1—Value to match against
CHOOSE (<ID>)
All the available IDs can be found in the ADD statement of the leader of the currently active group in the Program listing
To use a CHOOSE statement, you must first manually replace a family table instance of the group or replace the group with another group.
CHOOSE statements cannot be included in conditional statements.
Replaces the ADD end END ADD
This is for assemblies to link assy input variables to program variables in assembly components.
EXECUTE {PART}/{ASSY } name or variable
input variable of design at next lower level = expression
input variable.....
END EXECUTE
Only reaches one level, but that level can domino to the next.
Can be used with IF-ELSE-ENDIF
MASSPROP
IF THICKNESS > 1
PART PLATE
ELSE
ASSEMBLY BLOCK
ENDIF
END MASSPROP
Can be inserted anywhere within the FEATURE ADD - END ADD or PART ADD - END ADD statement
Stops program execution and uses FEAT CLASS menu to allow additional work to be done on the model.
MODIFY d# = value
Thanks David - moving to Creo.
Best,
Toby