Pat Stanford Posted May 26, 2022 Share Posted May 26, 2022 Do any of you have a way of getting the "horizontal" offset of the dimension text along a linear dimension? ObjectVariableReal of 44 from the appendix seem like it should be what I need, but it always returns zero. I want to uncheck the Autoposition dimension (ObjVar 29 I believe) and then move the dim text to the "far" end of the dimension. But I can't find the right way to do it. Thanks. Quote Link to comment
Jesse Cogswell Posted May 26, 2022 Share Posted May 26, 2022 (edited) @Pat Stanford I have been playing around with GetObjectVariableReal 44 and I think that I have the answer for you. If the dimension text has been manually moved, ObjVar 44 will return a percentage value of where the text is along the dimension line (0 if all the way to the left, 1.0 if all the way to the right, 0.5 at center). If you move the dimension text outside the bounds of the dimension line, you start getting outputs that don't make a whole lot of sense. If the text hasn't been manually moved (ObjVar 29=TRUE), ObjVar 44 will return 0. EDIT: After actually reading your post all the way through and what you are trying to do, this code worked for me. PROCEDURE MoveDim; PROCEDURE DoTheThing(h:HANDLE); BEGIN SetObjectVariableBoolean(h,29,FALSE); SetObjectVariableReal(h,44,1); ResetObject(h); END; BEGIN ForEachObject(DoTheThing,(SEL=TRUE)); END; Run(MoveDim); This code moves the text to the far right side of the dimension, changing the ObjVar 44 to 0 will move it to the far left side. Edited May 26, 2022 by Jesse Cogswell 1 Quote Link to comment
Pat Stanford Posted May 26, 2022 Author Share Posted May 26, 2022 Thank you @Jesse Cogswell I was resetting the value of 44 before I was checking what the value was. 😞 Thank you for the help. 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.