×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Replace Parts macro

Replace Parts macro

Replace Parts macro

(OP)
Hi all,
Does anyone know of a macro that will enable me to select some parts and do a replace part on them.
I have an assembly where I need to replace 20 copies of the same part with a different part and it's a bit of a pain.
I can't use 'replace all'.

bc

RE: Replace Parts macro

I must not understand correctly what you want to do, because if it's the same part inserted 20 times in the assembly that you want to replace with another part you can use the following methods...

1. You can use revision manager to replace the part.
2. You can click replace part in the assembly and select replace all occurences.

If you have more than one part that will replace the original maybe you can select the original part and then you define alternate components for this part so that you have a pull down menu with those parts instead of having the replacement part window.

I hope this helps

Patrick

RE: Replace Parts macro

(OP)
Hi Pat,
It's a big piping assembly and there are about 40 parts of one particular fitting that need to be replaced with a different fitting.
Unfortunately there are probably 60 or more of these parts in the assembly, so I can't just replace them all, otherwise it would be simple. Revision manager would also replace all of them.
As I'm working through the assembly doing mods and checking each tube line I'm replacing them individually with the replace part command, but as you can imagine it's quite time consuming.
What I was after was a command that would let me pick several of these parts, define the replacement part, and then do the replace command for me on those selected. I've not many to do now, but it would be a usefull little macro. Maybe I'll try and write it myself if I get time.

Can anyone tell me if what I want to do is possible in V20?

bgvasilis - I can't see anything at the link you posted, but then I'm not good at German

Thanks
bc

RE: Replace Parts macro

Ok now I understand! It would be cool if you could select them in the assembly tree with the ctrl key and then replace.

Good luck

Patrick

RE: Replace Parts macro

bc,

that site does not offer any macro that does what you would
like to do. In general there is also one problem: you must be
in that (sub)assembly that do contain the part(s) to be replaced.
I don't know at the mo whether this also applies when issuing
that command through the API
No, in V20 there is no enhancement to the Replace command, single
selection only. Only one thing is new: move multiple parts with
some options how to handle relationships of the parts affected
by the move

dy

RE: Replace Parts macro

(OP)
Don,
Thanks for that info.
Yes, I understand that you would only be able to replace parts or sub asemblies that exist at the current level.
It isn't that often you need to do so many of the same part, but even just being able to replace parts and not sub-assemblies would be really useful.

Thanks
bc

RE: Replace Parts macro

Here's a hair brained scheme.

Could you use transfer/disperse or something and move all the occurances you want to change into a separate 'sub assy'.

In that sub assy you could 'replace all'.

You could then move them back to the original assy.

I don't think it would work because you'd probably lose your assy relationships but I haven't used transfer/disperse much so someone that knows what they're on about may know  differently.

KENAT, probably the least qualified checker you'll ever meet...

RE: Replace Parts macro

(OP)
Hi all,
I've been working on this problem and have now got something working.
It will replace only the selected parts with a previously defined model, so you can pick several different parts and replace them with another, as against doing them one-by-one or replacing all.
I'm now trying to refine the routine but need a bit of help with the programming.
What I need to do is check that any of the parts (or sub-assemblies) selected is itself not within a sub-assembly.
I'm stuck on what I can use to check this.
Any ideas ?

bc.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources