Jump to content

How to detect screen plane/layer plane?


Recommended Posts

Hi,

I'm working with a 2D path object plugin, and I'd like to detect if the path has been created on a screen plane or layer plane. 

 

I tried this:

GetObjectVariableBoolean(handle, 1160);

using both plugin and path handles, but I always get the same result drawing in screen plane or layer plane.

 

 

Any advice is appreciated, thanks!

 

Andrea

Link to comment

Can you post a small sample file showing this issue. I just tested this before I posted.

 

I drew a line in layer plane. Duplicated it and converted to Screen Plane and then ran the following one-line script.

 

Message(Date(2,2),' 650:',GetObjectVariableBoolean(FSActLayer,650),' 651:',GetObjectVariableBoolean(FSActLayer,651));

Message(Date(2,2),' 650:',GetObjectVariableBoolean(FSActLayer,650),' 651:',GetObjectVariableBoolean(FSActLayer,651));

I get reversed results between the Layer and Screen plane versions.

Link to comment

GetPlanarRef doesn't work too. I created a new 2d path plugin and GetObjectVariableBoolean 650 and 651 works correctly, Pat!

I will check what's wrong in my code.

 

EDIT:

Now I understood. Variable 650/651 read if an object is 2D or 3D: a 2D object in a custom plane is detected as 3D. For this reason the new plugin I created works, because I only created a 2D polyline to test. But my plugin use the 2D path to create a 3D object, so I receive the same value because my object is a 3D object, in both screen or plan mode.

 

The only way to solve my problem is being able to read the custom plane tilt, but I didn't find a command for this.

(I found GetWorkingPlaneN but it isn't relative to an object)

 

 

Thank you all!

 

Edited by AFDesign
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...