Thank you, @Pascal. Just noticed this and downloaded it. I’m sure it’s going to be very useful.
Hey @Pascal, I’m having a dyslexic moment here. I wonder if you could elaborate on the instructions you have posted above? Let’s say I want to replace the cubes with the sphere in the attached file. At what point exactly do I run the command?
Thank you Replace Object py.3dm (256.6 KB)
I wonder, how do I replace 1 or more polyline shapes with another polyline
@cosmas - it seems kinda busted right now… I’ll take another look when I can.
-Pascal
Hope you will be back soon
Hi. Just discovered this script that can be very useful for my needs if I can manage to make him work.
My issue is that seems that after replacing the objects the position of the new objects seems to be randomly moved in all directions.
Maybe I am doing something wrong, I don’t understand why it is asking me for the first object, after that for the second objects. Which object from the green ones it is suposed to be the first object and which ones to be the second ones into selection order?
ReplaceObjects.3dm (1.1 MB)
Hello- here is a much simpler and probably more useful version
ReplaceObject2.py (878 Bytes)
To use the Python script use RunPythonScript
, or a macro:
_-RunPythonScript "Full path to py file inside double-quotes"
@cosmas, fyi…
-Pascal
Right, the first version makes an attempt to orient the objects, this one does not - I’ll look at it some more, my guess is it wiull be hard to make it very relaible but I can probably do better than what I have.
-Pascal
You are fantastic developer.
The only thing I want to know that, is it possible to maintain to change objects angle.
Hi Pascal, this script comes in very handy for me every now and then. Do you know if there is an equivalent for curves as well? I noticed it doesn’t work for curves… cheers
it seem like the object will be replaced and located via center of volume or something like this, I think better it will have some extra function like select anchor point to ensure the object maintain in current location
Hi,
Here is one that work for curves:
Replace.py (1.5 KB)
Best,
Pip