Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Pro/Program problems 1

Status
Not open for further replies.

toolman2

Mechanical
Mar 6, 2003
8
I can't figure out why a simple program for a two part assy won't work. The second part is part of a family table. I get no errors but Pro tells me that the model didn't change. Could someone please look at my code and see what I am doing wrong? I've tried multiple variations of code with errors in some cases and no luck in the rest. I am using ver 2001 and we are also using Intralink.

INPUT
HOLDER STRING
"Enter holder number"
END INPUT

RELATIONS
IF HOLDER == "1"
comp = &quot;vfem50013<cat50>.prt&quot;
ENDIF

IF HOLDER == &quot;2&quot;
comp = &quot;vfem50014<cat50>.prt&quot;
ENDIF

IF HOLDER == &quot;3&quot;
comp = &quot;vfem50015<cat50>.prt&quot;
ENDIF
END RELATIONS
.
.
.
ADD PART MS46597_RETENTION_KNOB
INTERNAL COMPONENT ID 50
END ADD

ADD PART comp
INTERNAL COMPONENT ID 53
END ADD
 
Replies continue below

Recommended for you

Hi Toolman2,

The problem is simple. You must change the following syntax:

ADD PART comp
INTERNAL COMPONENT ID 53
END ADD

to this:

ADD COMPONENT (COMP)
INTERNAL COMPONENT ID 53
END ADD

Good luck!

:)-Hora
 
Thanks Hora for replying,

I tried your suggestion and am getting the error shown below. I've tried every imaginable variation I could think of including using quotes, parenthesis, lower case, etc. I have verified the validity of the family table and it's instances. Is there something else I need to do within the family table?
We have the CAD Train software for this version of Pro and I've searched the web for help. Everything I've tried either doesn't work or gives me the error below.

ADD PART MS46597_RETENTION_KNOB
INTERNAL COMPONENT ID 50
END ADD

ADD COMPONENT (COMP)
INTERNAL COMPONENT ID 53
END ADD
!*** ERR: the model to be added is non-existent or not interchangeable
 
Hi again Toolman2,

It should work with ADD COMPONENT (COMP).

Please take a look at the following discussion:
thread555-24772 (PRO/PROGRAM - Swapping components in an assembly) posted by Oxana few months ago.

The error tells you that the code written is correct. The programs tries to replace the parts, but someting is wrong. Please remove the &quot;<cat50>&quot; from your relatins and let the relations like tis:

RELATIONS
IF HOLDER == &quot;1&quot;
comp = &quot;vfem50013.prt&quot;
ENDIF

IF HOLDER == &quot;2&quot;
comp = &quot;vfem50014.prt&quot;
ENDIF

IF HOLDER == &quot;3&quot;
comp = &quot;vfem50015.prt&quot;
ENDIF
END RELATIONS

Please keep me in touch.

-Hora.
 
Thanks Hora,

I have read Oxana's thread and in fact printed it out since it almost identical to my scenario. I've tried the suggestions in that thread and your latest suggestion with no luck. I've pretty much concluded that I have an issue with my family table or something.
Thanks for your replys.

Toolman2
 
Hi Toolman2,
Do not disperate. I have one question:

Did you renamed the instances or the generic part in intralink recently? Please verify with explorer if in your workspace if the file name of the generic is &quot;cat50.prt&quot;.

I don't understand why it doesn't work. I did this many times and every time worked fine for me. Only if there is a problem with the names.

-Hora
 
Hi Guys, I am having many headaches with &quot;working&quot; Pro/Programs in production. I have unearthed some operational issues... ( e2002060, e2002350 & i2002270 ). It seems that Pro/Programs created in earlier versions are having difficulty working now. There is a PTC workarouns available. It basically states that using CID's in Pro/PROGRAM can cause &quot;barfage&quot;. This TAN may sound different, but, I would not rule out its impact in your issue. Give it a read and see if it applies.

TAN 119053

-GAC

 
Everything looks pretty much good, except that you need to remove the &quot;.prt&quot; from your assignment. ProE just needs the name, you've already designated that it's a part by the ADD COMPONENT. Your code should look like this.

RELATIONS
IF HOLDER == &quot;1&quot;
COMP = &quot;VFEM50013&quot;
ENDIF

IF HOLDER == &quot;2&quot;
COMP = &quot;VFEM50014&quot;
ENDIF

IF HOLDER == &quot;3&quot;
COMP = &quot;VFEM50015&quot;
ENDIF
END RELATIONS

Also note that ProE is case sensitive in this area so it is best to always use CAPS when applying names or parameters.

Good luck and if you have any other questions or problems, let me know. I have been working on a large assembly/mass customization project for the last year and use ProProgram quite extensively.
 
Thanks Cardenas,
I think... it's working now, not sure because it seems to accept my input, but the change isn't being reflected in the model. The same part stays in the assembly visually. Is there something else that needs to be done to force that through?

Toolman2
 
We have struggled through with Pro/Program on a major project this year where we have to swap multiple components in an assembly.
We also encountered your problem where models would not swap over properly and by chance discovered a method that works for us.

We would assemble an instance into the program and when you opened the program it would look like below

ADD SUBASSEMBLY <Instance name>
INTERNAL COMPONENT ID 1224
PARENTS = 406(#1)
END ADD

I tried to edit the instance name to (COMP) which had earlier been given values in the relations section.

ADD SUBASSEMBLY (COMP)
INTERNAL COMPONENT ID 1224
PARENTS = 406(#1)
END ADD

This was not interchanging models but if you first edit the program like this

ADD INSTANCE <Generic name>
INTERNAL COMPONENT ID 1224
PARENTS = 406(#1)
END ADD

save the program, regenerate & change the value for (COMP) in the model.
It does not change the model in the assembly to the new value YET but it does trigger something in Pro/Program that lets it know you mean to change something.

When you go back into the program it will have defaulted back to

ADD SUBASSEMBLY <Instance name>
INTERNAL COMPONENT ID 1224
PARENTS = 406(#1)
END ADD

You then edit it back to

ADD SUBASSEMBLY (COMP)
INTERNAL COMPONENT ID 1224
PARENTS = 406(#1)
END ADD

Save the program & it will work for you.

We have successfully employed this method on assemblies with over 100 interchangeable components.

What we can't find an answer for is when we get the message

!*** WARNG: invalid input variable in assignment

when trying to add parameters to execute statements.

Hope this helps.




 
TRY USING

INPUT
HOLDER NUMBER
END INPUT

NOT HOLDER STRING
/************************

INPUT
HOLDER STRING
&quot;Enter holder number&quot;
END INPUT

RELATIONS
IF HOLDER == &quot;1&quot;
comp = &quot;vfem50013<cat50>.prt&quot;
ENDIF

IF HOLDER == &quot;2&quot;
comp = &quot;vfem50014<cat50>.prt&quot;
ENDIF

IF HOLDER == &quot;3&quot;
comp = &quot;vfem50015<cat50>.prt&quot;
ENDIF
END RELATIONS
.
.
.
ADD PART MS46597_RETENTION_KNOB
INTERNAL COMPONENT ID 50
END ADD

ADD PART comp
INTERNAL COMPONENT ID 53
END ADD
 
ALSO WHEN EXECUTING PARTS/ASSEMBLIES IN ASSEMBLIES
YOU NEED TO DO THIS AFTER THE
&quot;END RELATIONS&quot;

EXECUTE PART &quot;PART NAME&quot;
HOLDER = HOLDER
END EXECUTE

OR

EXECUTE ASSEMBLY &quot;PART NAME&quot; NOT SUB-ASSEMBLY
HOLDER = HOLDER
END EXECUTE

LATER

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor