PDA

View Full Version : Help with execute command



hypersuperduper
09-20-2017, 09:28 AM
I have been using execute command recently because I am managing lots of objects in a scene, and want to make simple changes to the objects without opening them in modeler.

For nudging the geometry of lots of objects it works like a charm with the move command, but now I want to replace the geometry in one a layer of several objects with the geometry from another object. Copy, delete, paste, in that order Unfortunately, once I use the delete command layout sort of loses the layer and replaces it with a null, and the layer name is gone. then when I paste it creates a new object with the geometry instead. I didn't realize that it was doing this and it wrecked a bunch of objects. (Luckily I had a backups) Is there a good way to do this within layout that works?

To be specific what I want is to select one object layer in layout. Copy the geometry to the clipboard, select multiple objects layers in layout and replace the geometry in those layers the geometry in the clipboard.

MonroePoteet
09-21-2017, 07:52 AM
I don't think you can make mesh changes in Layout, programatically or otherwise. The "meshedit" category of commands which allow modifications to the geometric mesh (points and polygons comprising a LW Object) are only valid in Modeler.

mTp

Ztreem
09-21-2017, 09:04 AM
The simplest way is maybe to save the scene and the replace the object with another in a text editor. Maybe you can use a find and replace command of some sort?

creacon
09-21-2017, 09:58 AM
Think again ;-) This has been possible using the SDK for several years now.

creacon


I don't think you can make mesh changes in Layout, programatically or otherwise. The "meshedit" category of commands which allow modifications to the geometric mesh (points and polygons comprising a LW Object) are only valid in Modeler.

mTp

hypersuperduper
09-21-2017, 11:15 AM
I sort of got it to do what I wanted. By typing the command "mergepoints 1000" to collapse the layer into a single 1 point poly instead of using the "delete" command the layer wasn't destroyed and the paste command worked mostly as expected. then I just have a rogue 1point poly to deal with. Unfortunately, the paste command doesn't work on every selected object for some reason only the first one. If I had any scripting wherewithal I would write a script. But I don't so I won't.

hypersuperduper
09-21-2017, 11:36 AM
Find and replace in a text editor is great for lots of things, particularly in conjunction with load from scene, but it doesn't do what I want in this case. Imagine a situation in which you have 100 houses, each as a separate object with identical layer stuctures containing parts like windows, chimneys etc. and you want to replace the geometry in the "window" layer in a bunch of houses with the geometry in the window layer in another object. Ideally while being able to view all the houses at once so you can easily compare them all. As stated above layout can do this via execute command in modeler tools without ever opening modeler, but it isn't very practical because paste doesn't work on all selected items at once, you must cycle through them one by one.

MonroePoteet
09-21-2017, 01:39 PM
Think again ;-) This has been possible using the SDK for several years now.

creacon

OK, thanks. Maybe I'll give it a try sometime.

mTp