How to use program command under model intent in assembly? Is there any tutorial for that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to use program command under model intent in assembly? Is there any tutorial for that?
- Labels:
-
Assembly Design
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
- Current Vals will run unaided;
- Enter will show the choices to change and then prompt you to change the selected ones;
- Read File will get the values from a file you select.
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"
Comments
/* < your comment
Place the comment immediately after an ADD to keep its place with the feature.
Input
Types:
- Number (default)
- String
- Yes_No.
Must exist between INPUT and END INPUT.
Can use IF-ELSE-ENDIF
IF-ELSE-ENDIF
logical operations are >,<, ==; string literals are in quotes.
Component Replacement
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.
Relations
Must be between RELATIONS and END RELATIONS
XYZ = <parameter_name>:fid_<feature_name>:<comp_id>
or
XYZ = <parameter_name>:fid_<N>:<comp_id>
Family table based replacement
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
User-Defined Features
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.
EXECUTE
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
MASSPROP
IF THICKNESS > 1
PART PLATE
ELSE
ASSEMBLY BLOCK
ENDIF
END MASSPROP
INTERACT
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.
ADD, ADD SUPPRESSED
MODIFY - changes dimensions
MODIFY d# = value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks David - moving to Creo.
Best,
Toby
