Using Reference outside of Loops when using SmartAssembly - Rookie question
‎Apr 30, 2014
09:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Apr 30, 2014
09:55 AM
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.
Labels:
- Labels:
-
Assembly Design
2 REPLIES 2
‎Apr 30, 2014
10:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Apr 30, 2014
10:10 AM
You need to declare any variables or references outside (before entry
to) the FOR or WHILE loop if you want to access them outside of the loop
once it has been completed.
Charlie Fuller
SIGMAXIM, Inc. Norwood Corporate Center
1502 Providence Highway, Unit 2, Norwood, MA 02062
(Tel) 617-981-6500 x327 (Fax) 617-830-0768
(Toll free) 877-SIGMAXIM www.sigmaxim.com
to) the FOR or WHILE loop if you want to access them outside of the loop
once it has been completed.
Charlie Fuller
SIGMAXIM, Inc. Norwood Corporate Center
1502 Providence Highway, Unit 2, Norwood, MA 02062
(Tel) 617-981-6500 x327 (Fax) 617-830-0768
(Toll free) 877-SIGMAXIM www.sigmaxim.com
‎May 02, 2014
07:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎May 02, 2014
07:26 PM
Excellent.Thanks Charlie!