Jump to content
David O

Adding Extrude Along Path Solids Issue

Recommended Posts

Hello everyone !

DId anyone here already experienced problems trying to add extrude along path solid with anything else inside VectorScript ?

 

If i create an Extrude Along Path solid (via  createcustomobjectpath('Extrude Along Path', hpath, profile); and then try to add the resulted solid with anything else (say, spheres...)

using DoMenuTextbyName('Solid Operations',1); or with AddSolid() ... it doesn;t work ...

The weird thing is that if i try to get the resulted solids from the script and run the AddSolid command manually over them it works perfectly ...

 

Did someone here already faced this situation and came up with any turnaround ?

Thanks !

Share this post


Link to post

Two potential issues, both arising out of the fact that the script generating the EAP doesn't actually execute until after your script finishes, so using a menu command will look for selected objects, and that the time you call the menu, the object doesn't exist yet.

 

In general, avoid DoMenuText in favor of vs commands that accept handles.  Using AddSolid() should work better for you: http://developer.vectorworks.net/index.php/VS:AddSolid

 

A solid addition is essentially a container, so you should be fine invoking the add command before it has had a chance to regenerate.  If you need to do something with or get information about the resulting solid addition, you can try SetObjectVariable( hExtrude, 1167, true); (ovParametricImmediateReset), which will force an SDK-based PIO to regenerate immediately before continuing on with the script.

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.

×