AFDesign 0 Posted May 6 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 Quote Share this post Link to post
Pat Stanford 652 Posted May 6 Try using GetObjectVariableBoolean (handle, 651) This should return True for a Screen Plane Object. Also take a look at 650 which will return true for a 3D (Layer Plane) object. Quote Share this post Link to post
AFDesign 0 Posted May 6 Thank you Pat, I tried but I always receive the same result, using 650 and 651. Maybe it is possible to detect if the plane is horizontal or tilted? Quote Share this post Link to post
Pat Stanford 652 Posted May 6 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. Quote Share this post Link to post
AFDesign 0 Posted May 6 Sorry I'm using a 2D path plugin so I can't post a small sample. I will create a new 2d path plugin and I will try your advice on it! I will let you know if it works tomorrow. Thank you! Quote Share this post Link to post
JBenghiat 200 Posted May 6 Try GetPlanarRef(). I can’t recall off the top of my head if 0 is ground or screen. Quote Share this post Link to post
AFDesign 0 Posted May 7 (edited) 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 May 7 by AFDesign Quote Share this post Link to post