Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
Paolo

Getting extrusion value

Recommended Posts

Hi all,

Is it possible to get the extrusion value of an extruded object in VectorScript?

I have checked the VectorScript Reference but found nothing appropriate.

Thanks for your help!

Share this post


Link to post

Maybe the combination of Get3DOrientation, Get3DInfo and Set3DRot would work?

Share this post


Link to post

Your suggestion has been the key! Thank you!

Here's a procedure to increase all the extruded object in a selection of a user given value:

[font:Courier New]procedure increaseExtr;

{the goal is to increase extruded objects in the selection of a user requested value}

var

oggetto:HANDLE;

increaseValue : REAL;

FUNCTION increase(h:HANDLE):BOOLEAN;

var

height,width,depth:REAL;

xRot, yRot, zRot:REAL;

p0X, p0Y, p0Z: REAL;

p1X, p1Y, p1Z: REAL;

result, isMirroredXY: BOOLEAN;

begin

{check if the obj is an extrusion}

if (GetType(h) = 24) then

BEGIN

result := Get3DOrientation(h, xRot, yRot, zRot, isMirroredXY);

Get3DCntr(h, p0X, p0Y, p0Z);

SetRot3D(h, 0,0,0 , 0,0,0);

{here depth = extrusion value}

Get3DInfo(h, height,width,depth);

{I increase the depth}

Set3DInfo(h, height,width,depth+increaseValue);

Set3DRot(h, xRot, yRot, zRot , 0,0,0);

Get3DCntr(h, p1X, p1Y, p1Z);

{move of the misplacement p0-p1}

Move3DObj(h, p0X-p1X, p0Y-p1Y, p0Z-p1Z);

Get3DCntr(h, p1X, p1Y, p1Z);

END;

increase := FALSE;

end;

begin

{ask the value to increase}

increaseValue := RealDialog('Increase extrusions in the selection of this value','10');

{apply to the selected set of objects}

ForEachObjectInList(increase, 2, 0, oggetto);

end;

run(increaseExtr);[/font]

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
Sign in to follow this  

 

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.

×