MullinRJ Posted December 6, 2023 Share Posted December 6, 2023 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. TIA, Raymond Quote Link to comment
BillW Posted December 8, 2023 Share Posted December 8, 2023 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 SetEntityMatrix(objH,offsetX,offsetY,offsetZ,xRotation,yRotation,zRotation); 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 GetPlanarRef GetWorkingPlaneMat SetEntityMatrixN SetPlanarRef BillW Quote Link to comment
MullinRJ Posted December 8, 2023 Author Share Posted December 8, 2023 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, Raymond Quote Link to comment
Recommended Posts
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.