Jump to content
Developer Wiki and Function Reference Links ×

objects on PLANAR


Assembly

Recommended Posts

Can anyone help with Planar objects?

I'm trying to script an object to draw on a 'FrontPlane' (front view, origin 0,0,0).

If I have the plane already in the drawing I can move objects in the script to the correct plane.

I've had success with the following method.

1) Drawing (non script) a rectangle (set to a layer plane)

2) naming the rect 'FrontPlane',

3) In my script using:

PlanarRef:=GetPlanarRef(Getobject('FrontPlane));

SetPlanarRef(pioRect,PlanarRef);

I test with:

AlrtDialog(concat('PlaneRef: ',GetPlanarRef(Getobject('FrontPlane))));

This tells me the long int.

What I can't do is create a new Planar reference in a script.

I can change the working plane with:

SetWorkingPlaneN(0,0,0, 0,0,1, 1,0,0);

When I use:

AlrtDialog(concat('Start:',GetCurrentPlanarRefID));

SetWorkingPlaneN(0,0,0, 0,0,1, 1,0,0);

AlrtDialog(concat('End',GetCurrentPlanarRefID));

The return values are

Start:0

End:1

This is changing the working plan.

But not returning the same longint as:

AlrtDialog(concat('End',GetPlanarRef(Getobject('FrontPlane))));

The PROCEDURE Thus Far:

PROCEDURE hFrontPlane(hObject:HANDLE);

VAR

PlanarRef:Longint;

BEGIN;

AlrtDialog(concat('Start',GetCurrentPlanarRefID));

SetWorkingPlaneN(0,0,0, 0,0,1, 1,0,0);

PlanarRef:=GetCurrentPlanarRefID;

SetPlanarRef(hObject,PlanarRef);

AlrtDialog(concat('End',PlanarRef));

END;

Thanks

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