Jump to content
Developer Wiki and Function Reference Links ×

PIO ExtrudeAlongPath Reset On Attribute Change


Recommended Posts

I created a PIO using an arc as path, converted to nurbs curve and used an oval for profile shape.

Original arc created in horizontal 2d plane then when converted to nurbs rotated vertical (I want the option to rotate as desired).

Then created an extrude along path object from rotated nurbs curve and oval profile.

Works okay .... until I select object and change properties in attribute dialog then PIO resets so that it changes orientation relative to the current viewing angle.

Can anybody help?

This does not happen with other PIO's say made from sweep objects.

PIO code is as follows;

PROCEDURE Test1;

VAR

objname :STRING;

result :BOOLEAN;

oh,rh,wh :HANDLE;

h1, h2, h3 :HANDLE;

BEGIN

result:= GetCustomObjectInfo(objname,oh,rh,wh);

IF result THEN BEGIN

ArcByCenter(9", 9", 9", 180, 90);

h1:=LNewObj;

h1:=ConvertToNURBS(h1,false);

Set3DRot(h1, 90, 0, 0,0, 0, 0);

Oval(-3 5/16", 3 5/16", 3 5/16", -3 5/16");

h2:=LNewObj;

h3:=CreateExtrudeAlongPath(h1, h2);

END;

END;

RUN(Test1);

Link to comment
  • Vectorworks, Inc Employee

ConvertToNURBS is a view dependent operation.

The simplest way around this is to check the view.

If you are not in a top or top plan view then save the view, switch to a top view, do the work then switch the view back.

Link to comment
  • Vectorworks, Inc Employee

Yes, this works as designed.

It works the same way as if you were to run the Convert To NURBS menu command. There are times when you want to work with the object in the current view or a view other than top.

There are a few things you can do to speed things up.

Check the view first.

If xAngleR,yAngleR,zAngleR are all 0 then don't change the view.

You should also check the the projection GetProjection() in case you are working in rotated plan.

IF (Projection <> 6) & ((xAngleR<> 0) | (yAngleR<> 0) | (zAngleR<> 0)) THEN SetView()

You can also use SetPref(9873,TRUE) to prevent a screen redraw when the view is changed but then you MUST call SetPref(9873,FALSE) after you set the view back. You will see the largest speed increase in a 3D view from this.

In 2011 there are some other methods using the planer ref that may work depending on what you are trying to accomplish.

Link to comment

Kevin,

Would moving the view so the objects are off screen, doing the operation and then moving the view back help in the speed. I think I used this a long time ago and found that the drawing of the selection handles was the biggest slow down and that having them off screen meant they didn't have to be drawn and was much faster.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...