Replace part by assembly using parameter
Hi,
I want to replace a part with an assembly using a parameter.
I only know the model name so I don't know if it is an assembly or not.
For example:
LUG_CODE == "101" or LUG_CODE == "102"
If I change the program like this, it can not replace:
ADD PART (LUG_CODE)
...
END ADD
Same for this:
ADD SUBASSEMBLY (LUG_CODE)
...
END ADD
I have read somewhere that I should use COMPONENT instead of PART or ASSEMBLY but LUG_CODE should be "101.PRT" or "101.ASM" then.
How do I know if component "101" is part or assembly? Is there a function that I can use?
PS: I replace the models with an interchange assembly.
Kind regards, Koen.
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

