Using Reference outside of Loops when using SmartAssembly - Rookie question
I can't find anything in the help about how to use a reference outside of a For or While loop in SmartAssembly.
I am copying an assembly with the drawing and I am trying to set the reference name for the drawing using Copy_REF - which works in the loop but the last line "SWITCH_TO_MDL TOP_LEVEL_DRW" fails.
Any help would be greatly appreciated!
-Scot
USE_LIBRARY_MDL lib:templates\TROUGH_GUARD_TL asm_copy TOP_LEVEL_ASSY
GET_SESSION_MDLS MDL_TYPES DRAWING MDLS_IN_SESSION_ARRAY
FOR mdl REF ARRAY MDLS_IN_SESSION_ARRAY
GET_MDL_TYPE mdl MDL_TYPE
IF MDL_TYPE == "DRAWING"
COPY_REF mdl TOP_LEVEL_DRW
SWITCH_TO_MDL TOP_LEVEL_DRW
INSERT_DRW_SHEET TOP_LEVEL_DRW 2
WAIT
END_IF
END_FOR
SWITCH_TO_MDL TOP_LEVEL_DRW
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.

