AnsweredAssumed Answered

Need to determine which component config is used to resume a sketch used in drawing

Question asked by Alex Smith on Jan 27, 2015
Latest reply on Jan 27, 2015 by Alex Smith

I am back into brainstorm mode.  I have an automated assembly that uses values from a text file to generate suppression states.  It builds an assembly based on global variable values and works great.  The drawing BOM is generated by using component references.  I have attached a copy of the text file used (equations.txt), a screen shot previewing the equations (automation.png), and a screenshot of the model tree (tree preview.png).

 

I have 5 frames (parent with configs driving the length and more mounting points) that have the same component reference, but only 1 is used in the assembly.  The global variable value used in the text file will determine which frame is used.  As you can see in the equations manager attached, they are the first 7 components.  I need to put some reference dimensions on the drawing.  For the drawing, I have created a dummy sketch in the assembly simply to show reference dims on the drawing (Insert >> Model Items); for visualization purposes only.  Each frame will get its own sketch.  How can I determine programmatically which config is used and resume the required sketch for it?  In my mind I see it structured something like:

 

if frame = 205645

     resume sketch1

end if

 

if frame = 205645 (config 205646)

     resume sketch2

end if

.........continued until config 205651

 

Of course this is not code.  Just something to get my thoughts across.  I have done some research, but I have never done this before so any help would be appreciated.  Thanks in advance!

 

Alex Smith

Attachments

Outcomes