Jump to content
Developer Wiki and Function Reference Links Read more... ×
Andy Haengaertner

How can I replace the content of an auto hybrid using "set parent"?

Recommended Posts

Hi there,

 

Does anybody know how I can replace the content of an existing auto hybrid using a script? I tried DOMc "SetParent" Node but unfortunately it seems that this do not work for auto hybrids.

 

Any tipps how I can do this?

 

Thanks in advance

Andy

 

Share this post


Link to post

Hi

You have to browse the container-nesting of the object to find out, how they are nested. Sometings the Content node works, sometings you need commands like vs.GetCustomObjectProfileGroup(objectHand) etc.

As you can see, the autohybrid from an extrude is pretty good nested. Try first to replace the object (delete and set new object to it's parent). Maybe you have to reset object after that manipulation. Or maybe you will crash if you delete the content and do not attach a new contend (maybe start with add an additional object to the exitsting).

 

Not tested any of this, but that's the way I would try to crack the riddle. 

 

677929309_Bildschirmfoto2018-07-04um22_26_42.thumb.png.aa05bdc3563bde6d4d78e7492c6feec6.png

Autohybrid.vwx

Share this post


Link to post

Got it

Your Autohybrid content has it's own origin you have to compensate this. My first script works but the autohybrid is already wrecked. by use parent node wrong. So be careful what object you put in what other object. Worst case you put them somewhere you can't delete them anymore.

 

1657454363_Bildschirmfoto2018-07-04um22_54_56.thumb.png.e49805ded3cbd41be3c0948d1a7ec6cd.png

Autohybrid2.vwx

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×