Notifications
Clear all
[Closed] copy selection, move and convert to EP
Mar 26, 2010 2:15 pm
Hi all!
It´s me (again, dooh)
I tried to make a small simple script that
- copy (not instance) my selection
- move 500mm in the Xaxis
- convert it to an EditablePoly
I came up with this, all copied from the Listener, but it´s not working :-s
select $()
actionMan.executeAction 0 “40213” – Edit: Clone
maxOps.cloneNodes $Line02 cloneType:#copy newNodes:&nnl
select nnl
move $Line03 [500,0,0]
clearSelection()
Could somebody plz have a look at it
Take care
/Matt
3 Replies
Mar 26, 2010 2:15 pm
-- check if selection is not empty
if selection.count > 0 do with redraw off -- speed up operation doing it with no redraw
(
new = #() -- an array for new objects
-- clone with type #copy and shift (see MXS help [b]Interface: maxOps[/b] ->[b] Collapse and Clone Nodes[/b])
-- units.decodevalue (see MXS help[b] Units Struct - Accessing System and Display Units[/b] -> Methods)
maxOps.CloneNodes selection offset:[units.decodevalue "500mm",0,0] cloneType:#copy newNodes:&new
-- convert nodes set to Editable Poly (if can be converted)
convertto new editable_poly
-- select new objects if necessary:
select new
)
Mar 26, 2010 2:15 pm
Hi (Denis)!
I would like to thank you once again for your help… This script has saved me alot of time!
Now that I have used it for some time I would like too change one thing. Is it possible to collapse the selected objects to one single editable poly instead of seperated ?