Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATE ASSEMBLY 2

Status
Not open for further replies.

ideasuser

Industrial
Mar 30, 2006
51
Hi, I write VB program to create .exp files for single component in my assembly. The problem is I have to import .exp file for every single part. I have about 100 component in the die or mold. Is there any way to write batch file to import all of them at once. Thanks
 
Replies continue below

Recommended for you

ideauser,
Can you be a bit more specific with what your trying to do? What's the purpose of the .exp file? What are your trying to accomplish?

Regards,
SS
CAD should pay for itself, shouldn't it?
 
Thanks for asking. For example I draw block of steel and dimension it as p0=4, p1=2, etc.. Then in the block.exp has p0=8, p1=3. If I go to tools, expressions and import block.exp in and OK. My block will change size. And in tool die design, it has 50 different components I have to hightlight each component and import the .exp file 50 times.
I am looking for batch file to update the big assembly at once. Thanks again
 
What kind of file are you doing this to? Are you just modifying existing files for a new job and need to change the size of a bunch of components? Let me know I have an easier way to do this.
 
I do tool die design. For simple if my assembly file has to object: BLOCK1 & BLOCK2. BLOCK1 has Lenght=10, Width=5, Heigh=3. BLOCK2 has Length=6, Width=4 and Heigh=1. And I create 2 files: BLOCK1.exp with Length=20, Width=18, Heigh=2 and BLOCK2.exp with Length=2, Width=1, Heigh=1. In the assembly file, select BLOCK1 as make work part. Goto Tools menu, expression and inport BLOCK1.exp, OK. Then select BLOCK2 and make it working part. Update the block with BLOCK2.exp same method as above. Then I have new assembly with 2 different block size. I am looking for batch file or how to write VB program which interface with ugs nx to update 2 blocks at once.
 
In your top level assembly file you could have all your expressions for block one and two. So when you need to update them you could get by with only importing one exp file. So you need to link the expressions to the component files to do this.

For example in the top assy (lets call it top.prt) you have b1L=10,b1W=5,b1H=3 and so on. In block ones file you would have the expressions p0=top::b1L, p1=top::b1w, p2=top::b1H

Then all exp can be updated from the top.prt
 
Thank MBrookey for your wonderful help. The correct variable is p0="top"::b1l. And I found the Create link icon to link the variable to the top level assembly. It works both ways.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor