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
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
RE: Replace Parts macro
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
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
Good luck
Patrick
RE: Replace Parts macro
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
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
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
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.