Jump to content
Developer Wiki and Function Reference Links ×

How do you edit the profile from Extrude Along Path


Recommended Posts

I can get my macro to edit the profile if the user chooses "Path" when EditObjectSpecial (h, 4); is used, but I don't want user input.

How do I edit or delete and replace the profile in Extrude Along Path?

http://developer.vectorworks.net/index.php/VS:SetCustomObjectProfileGroup

Note that when you use the other function to retrieve the profile it might not work if no profile was set. Atleast that's how it behaves on the SDK.

Edited by hippothamus
Link to comment

Thanks Hip, but I can't get a grasp on the extrude process.

If you use the following to create an extrude-along-path + the new profile, how do I replace the 20mm profile with the new 50mm profile?

procedure test;

var

BTmp : boolean;

h1, h2, h3, h4, h5 : handle;

PipeOD, WallWdth : real;

begin

h1 := FSObject (ActLayer);

if (GetType (h1) <> 86) then

begin

Poly3D (5, -5, 0, 300, -300, 0, 300, -757, 0, 5, -462, 0);

h1 := ConvertToPolyline (LNewObj);

SetPolylineVertex (h1, 2, 300, -300, 3, 140, true);

SetPolylineVertex (h1, 3, 300, -757, 3, 140, true);

end;

if (GetType (h1) = 21) then

begin

PipeOD := 20;

WallWdth := 4;

Oval (-PipeOD/2, PipeOD/2, PipeOD/2, -PipeOD/2);

h2 := LNewObj;

Oval (-PipeOD/2 + WallWdth, PipeOD/2 - WallWdth, PipeOD/2 - WallWdth, -PipeOD/2 + WallWdth);

h3 := LNewObj;

ClipSurface (h2, h3);

h4 := PrevObj (h3);

h5 := CreateCustomObject ('Extrude Along Path', 0, 0, 0);

if (SetCustomObjectProfileGroup (h5, h4)) then begin end;

if (SetCustomObjectPath (h5, h1)) then begin end;

DelObject (h2);

DelObject (h3);

h1 := LNewObj;

end;

if (GetType (h1) = 86) then

begin

PipeOD := 50;

WallWdth := 4;

{ Create New Profile }

Oval (-PipeOD/2, PipeOD/2, PipeOD/2, -PipeOD/2);

h2 := LNewObj;

Oval (-PipeOD/2 + WallWdth, PipeOD/2 - WallWdth, PipeOD/2 - WallWdth, -PipeOD/2 + WallWdth);

h3 := LNewObj;

ClipSurface (h2, h3);

DelObject (h2);

DelObject (h3);

h2 := LNewObj;

{ Replace Old Profile }

{

h3 := GetCustomObjectProfileGroup (h1);

if (SetCustomObjectProfileGroup (h3, h2)) then begin end;

if (SetCustomObjectPath (h3, h2)) then begin end;

}

end;

end;

run (test);

Link to comment

{ Replace Old Profile }

{

h3 := GetCustomObjectProfileGroup (h1);

if (SetCustomObjectProfileGroup (h3, h2)) then begin end;

if (SetCustomObjectPath (h3, h2)) then begin end;

}

end;

end;

run (test);

First of all, SetCustomObjectProfileGroup needs the handle of the object, not the active profilegroup of that object.

Secondly, reset the object once you are done changing the profile group to make sure the object uses the new profile.

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...