Skip to main content
1-Visitor
January 11, 2012
Question

Restricted parameters & Pro/Program

  • January 11, 2012
  • 3 replies
  • 3273 views

Hi all,

I have a part with instances created using a family table and I used that part file in an assembly.

I had created a string parameter which is restricted and this parameter holds names of instances.

I want to automate the replacement of part within that assembly and I used Pro/Program for automation.

My problem is when I regenerate the component is not getting replaced for the parameter value. Am getting below mentioned error.

'3205021-OUTER-TUBE-2' cannot be retrieved.

Pro/Program replace of component 3205021-OUTER-TUBE (M40) failed in Assembly SAMPLE.

Aborting regeneration due to failures executing Pro/Program.

Guide me to solve this..

--

Dhinesh


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

3 replies

dm-31-VisitorAuthor
1-Visitor
January 11, 2012

Note

Outer tube is the part & SAMPLE is the assembly.

--

Dhinesh

1-Visitor
March 4, 2014

Did you ever solve this problem? I know the topic is almost four years old, but I am experiencing a similar issue.

dm-31-VisitorAuthor
1-Visitor
March 5, 2014

I solved this. But If you can post your question let me have a look to resolve.

1-Visitor
December 11, 2014

Let's say you have a family table with 2 instances: instance1, instance2.

In your assembly, install only the first one.

Create an integer pivot parameter, let's call it "param_a" and set the value 1 for it.

In relations create the decisions staements. Here is an example:

if param_a == 1

comp = "instance1.prt"

else

comp = "instance2.prt"

endif

Now, in Pro/Program identify the statements where you want to interchange your instances. You should find something similar with this:

ADD PART INSTANCE1

INTERNAL COMPONENT ID 24

PARENTS = 22(#6)

END ADD

and modify them in the following way:

ADD COMPONENT (COMP)

INTERNAL COMPONENT ID 24

PARENTS = 22(#6)

END ADD

Now, If you change the value of your "param_a" from 1 to 2, the program will automaticaly exchange the instances in your assembly.

You must be careful if you rename your instances, because the rename procedure will not rename the names of the instances in your relations! You must update manualy the names stored in relations. This is the only negative point for this method.

Good luck

13-Aquamarine
December 10, 2015

why don't u use "lookup_instance"