Jump to content
Developer Wiki and Function Reference Links ×

Does VS command "GetCurrentPlanarRefID" do anything useful?


Recommended Posts

When I execute GetCurrentPlanarRefID on a design layer it returns "1" if I am drawing on the Layer Plane or any 3D Working Plane I set. If I change to the Screen Plane it returns '0'. Inside a symbol's 2D side it returns "0", and on the 3D side it returns "-1". Inside an Extrude it returns "-1". On a Sheet Layer it returns "0".


I understand the Layer Plane is refID = 1, and the Screen Plane is refID = 0, while Working Planes have other integer values for the refID. I cannot get it to recognize any Working Plane I set in a drawing. Am I missing something, or does this command not do anything I can use?


The documentation says: "Return the current plane ref ID. This could be any plane: a working plane, screen plane (0), ground plane of a container, or any arbitrary plane."


If anyone has been able to use this command to identify planes other than the Screen or Layer planes, I would really like to hear from you.




Link to comment

RefID's are assigned to planar objects and I suspect the current working plane doesnt have an assigned RefID unless the current working plane has already been assigned to an existing planar object.


Depending on what you are doing in code, I think what you might be looking for


GetWorkingPlane(VAR x,y,z,xRotation,yRotation,zRotation) ;


and if you want to set an object to that plane, work out the offset and then




I would need to check but if you set a working plane and draw say a rectangle whether it draws in relation to current working plane? I kind of doubt it.


Other relevant calls are








Link to comment

Hi @BillW,

  I have tried GetCurrentPlanarRefID with and without objects on a working plane that I just set, and still get no meaningful response from it. I am very familiar with all of the other calls you cited, and they perform exactly as expected when used. I really just want find out how GetCurrentPlanarRefID is supposed to be used and under what conditions it operates.


Thank you kindly for your reply,


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.

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