Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Execute statement to edit instance

proDfunc

New member
I tried the modeling forum...with no replays...so


Has anyone changed the dim values of a family table member with a execute statement? I can change from one instance to another no problem, but when it comes to changing the geom of the instance it doesn't update.


For Example:


EXECUTE PART (STAGE_01)


A=A


END EXECUTE


ADD PART (STAGE_01).......ETC


When theparameter STAGE_01 changesit switches from one instance to another w/o a problem, but dimension values won't update in the family table part.


Thanks


Rodger
 
The workaround here is to do the following:

Create multiple values for the various instances, then figure out which one is in session and set the value accordingly. You then execute all of the possible values on the generic.

Here is a sample code:

Part name SEAL_GEN.PRT
Instances are SEAL_VERT & SEAL_HEIGHT
In the part you create three parameters: LEN_V, LEN_H, LEN

Then use this relation:

IF SEARCH(REL_MODEL_NAME,"SEAL_VERT")!=0
LEN = LEN_V
ELSE
LEN = LEN_H
ENDIF

Use the LEN parameter to drive the dimension for the seal's length.

In your assembly, the execute would look like this:

EXECUTE PART SEAL_GEN
LEN_V = LEN_V_ASSY
LEN_H = LEN_H_ASSY
END EXECUTE

In the assembly, you would set the parameters LEN_V_ASSY & LEN_H_ASSY

I hope this helps. I do this all of the time and it works like a charm. Play around with it on a small assembly until you get the hang of it.
Jim
 
Jim - I'm speechless....works great...UD MAN!!
smiley20.gif



Thanks
 
I do not believe it is documented in the PTC literature (surprise...surprise...).

Good luck. I am glad it worked out.
 

Sponsor

Back
Top