Community Tip - You can change your system assigned username to something more personal in your community settings. X
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
Excellent.Thanks Charlie!