Pro/Program problems
Pro/Program problems
(OP)
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 = "vfem50013<cat50>.prt"
ENDIF
IF HOLDER == "2"
comp = "vfem50014<cat50>.prt"
ENDIF
IF HOLDER == "3"
comp = "vfem50015<cat50>.prt"
ENDIF
END RELATIONS
.
.
.
ADD PART MS46597_RETENTION_KNOB
INTERNAL COMPONENT ID 50
END ADD
ADD PART comp
INTERNAL COMPONENT ID 53
END ADD
INPUT
HOLDER STRING
"Enter holder number"
END INPUT
RELATIONS
IF HOLDER == "1"
comp = "vfem50013<cat50>.prt"
ENDIF
IF HOLDER == "2"
comp = "vfem50014<cat50>.prt"
ENDIF
IF HOLDER == "3"
comp = "vfem50015<cat50>.prt"
ENDIF
END RELATIONS
.
.
.
ADD PART MS46597_RETENTION_KNOB
INTERNAL COMPONENT ID 50
END ADD
ADD PART comp
INTERNAL COMPONENT ID 53
END ADD





RE: Pro/Program problems
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!
RE: Pro/Program problems
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
RE: Pro/Program problems
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 "<cat50>" from your relatins and let the relations like tis:
RELATIONS
IF HOLDER == "1"
comp = "vfem50013.prt"
ENDIF
IF HOLDER == "2"
comp = "vfem50014.prt"
ENDIF
IF HOLDER == "3"
comp = "vfem50015.prt"
ENDIF
END RELATIONS
Please keep me in touch.
-Hora.
RE: Pro/Program problems
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
RE: Pro/Program problems
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 "cat50.prt".
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
RE: Pro/Program problems
TAN 119053
-GAC
RE: Pro/Program problems
RELATIONS
IF HOLDER == "1"
COMP = "VFEM50013"
ENDIF
IF HOLDER == "2"
COMP = "VFEM50014"
ENDIF
IF HOLDER == "3"
COMP = "VFEM50015"
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.
RE: Pro/Program problems
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
RE: Pro/Program problems
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.
RE: Pro/Program problems
INPUT
HOLDER NUMBER
END INPUT
NOT HOLDER STRING
/************************
INPUT
HOLDER STRING
"Enter holder number"
END INPUT
RELATIONS
IF HOLDER == "1"
comp = "vfem50013<cat50>.prt"
ENDIF
IF HOLDER == "2"
comp = "vfem50014<cat50>.prt"
ENDIF
IF HOLDER == "3"
comp = "vfem50015<cat50>.prt"
ENDIF
END RELATIONS
.
.
.
ADD PART MS46597_RETENTION_KNOB
INTERNAL COMPONENT ID 50
END ADD
ADD PART comp
INTERNAL COMPONENT ID 53
END ADD
RE: Pro/Program problems
YOU NEED TO DO THIS AFTER THE
"END RELATIONS"
EXECUTE PART "PART NAME"
HOLDER = HOLDER
END EXECUTE
OR
EXECUTE ASSEMBLY "PART NAME" NOT SUB-ASSEMBLY
HOLDER = HOLDER
END EXECUTE
LATER