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.

Replace a Family-Tabled Part

trillicomm

New member
I have a challenge for you gurus! Your answer will solve my problem.

I have a large assembly with 60 different screws. Each screw is an instance of a family-tabled part (screw).

I need to change all of those 60 screws with the new instances. Manually, I would right-mouse-click over each screw in the model tree and select Replace to choose the new instance. I can't imagine doing that for 60 times, let alone I could be asked to do again.

So the challlenge is to do some sort of Pro/Program or automation by feeding a text file that has the <FID_number>=<new_instance>. Edit Design and add <FID_number> STRING. Then regenerate the assembly to Read File. That will ask to locate the FID of each screw and replace it with the new instance.

I can explain better when you shoot back your questions.

Thanks for reading this!

T.
 
Sorry if you're already aware; you can Find (<ctrl>+f)
multiple instances and Replace them all in one shot.
I think building selection set(s?) by some means along
those lines is where I'd look. It's outside the scope
of my experience, so I'd just be feeling my way thru it.
 
Trillicomm,


I just tried this and to my surprise this actually works.


What you were doing "Manually, I would right-mouse-click over each screw in the model tree and select Replace to choose the new instance."


When you do this, select all 60 instances (by holding Ctrl down) and when selection is done, right-mouse-click and select Replace. It will replace all selected.


It works even they are not in consecutive order in model tree or even if they are not same family instance to begin with.


Charles
 
Charleskim,

You're correct, that works 100%! It needs 60 selections then 60 manual replacements. I am sure we can automate that.

Let's figure out a way to replace by the ID number.

T.
 
You need to clarify your intent.


My interpretation of;
"It needs 60 selections then 60 manual replacements.",
is "pick, replace, pick, replace, ..." which is not true.
Select all 60 instances and Replace once. That's been
answered but your statement indicates you didn't understand.


If your goal is figuring out how utitilize Pro/Program
for Replace operations you might make that clear and
people won't waste time suggesting how to do it without
Pro/Program.
 
jeff4136 said:
You need to clarify your intent.


My interpretation of;
"It needs 60 selections then 60 manual replacements.",
is "pick, replace, pick, replace, ..." which is not true.
Select all 60 instances and Replace once. That's been
answered but your statement indicates you didn't understand.


If your goal is figuring out how utitilize Pro/Program
for Replace operations you might make that clear and
people won't waste time suggesting how to do it without
Pro/Program.

As I stated, there are 60 different screws coming from different family tables. That means you have to replace 60 different times, not once.

Pro/Program using a file input is still my wish. Stay tuned.

Edited by: trillicomm
 
"I have a large assembly with 60 different screws.
Each screw is an instance of a family-tabled part (screw).
I need to change all of those 60 screws with the new instances."


Ok.
Thanks for clarifying.
Anxiously awaiting further developments.


smiley2.gif
 
jeff4136 said:
Sorry if you're already aware; you can Find (<ctrl>+f)
multiple instances and Replace them all in one shot.
I think building selection set(s?) by some means along
those lines is where I'd look. It's outside the scope
of my experience, so I'd just be feeling my way thru it.


You should try like Jeff said to find something that all the instances have in common in their name and make a search. Then you will be able to select all of them at once (select first one and hold shift and select the last one)Make a replace by layout and select the new instance you want to replace with. It's true you will have to click OK 60 times on the redefining window that will appear.


It is possible to replace them by Pro-program but in order to do that you have to create a parameter.


You curently have something like:


ADD PARTSCREW_NAME
INTERNAL COMPONENT ID 998
PARENTS = 873(#5)
END ADD


In order to replace screw_name to another part you need a parameter say "x" and write it like :


ADD PART(x)
INTERNAL COMPONENT ID 998
PARENTS = 873(#5)
END ADD


and then replace all the screws that you have in pro-program with (x)(This is what I remember, I may be wrong, haven't done this lately, I mean working with pro-program)


Then you need to write some sort ofrelations I think something like (again you need to find something that all screws have incommon in their name)


If x="screw_name"


x="screw_name1"


else


x="screw_name"


endif


But this I think will be more complicated. You need to replace all 60 screws in pro-program with (x) write a relation. And I don't know for sure if it's going to work.


Maybe someone else is working with Pro-program on adaily basis and can give you a more explicit answer.



Edited by: vlad1979
 

Sponsor

Back
Top