Sam Jones Posted October 28, 2023 Share Posted October 28, 2023 Thank you @Pat Stanford and @C. Andrew Dunning for the line style help. Works like a charm. I would like to set the text size of a dimension that I create inside a PIO. I draw the dimension with: LinearDim(x1, y1-(bayDepth/2), x1-offsetLft, y1-(bayDepth/2), 0, 0, 771, 770, 0 ); I would like to set the size of the text in that dimension object to 2. I attempted to do this with the following line: SetObjectVariableReal(LNewObj, 17, 2); Nothing changed. I can replace the "2" with any value and still nothing changes. Hopefully there is a way to control the text size of a dimension created in a PIO. Thoughts ? Sam Quote Link to comment
C. Andrew Dunning Posted October 28, 2023 Share Posted October 28, 2023 5 minutes ago, Sam Jones said: I would like to set the size of the text in that dimension object to 2. I attempted to do this with the following line: SetObjectVariableReal(LNewObj, 17, 2); Nothing changed. I can replace the "2" with any value and still nothing changes. Hopefully there is a way to control the text size of a dimension created in a PIO. Try TextSize. Quote Link to comment
Sam Jones Posted October 28, 2023 Author Share Posted October 28, 2023 2 hours ago, C. Andrew Dunning said: Try TextSize. I was afraid that was the answer Quote Link to comment
Pat Stanford Posted October 28, 2023 Share Posted October 28, 2023 Have you tried SetTextSize? You probably need to get the text length first, but it should work. Or, text objects might be one of the things that don't reset the LNewObject and you will have to Waldo for it. Quote Link to comment
C. Andrew Dunning Posted October 28, 2023 Share Posted October 28, 2023 36 minutes ago, Sam Jones said: I was afraid that was the answer Why the concern. All of my tools use that call w/o issue. Quote Link to comment
Sam Jones Posted October 28, 2023 Author Share Posted October 28, 2023 Not a big concern or rocket science, but I like to avoid the collecting global value, saving value, changing value, do operation, change value back collection of calls. Quote Link to comment
C. Andrew Dunning Posted October 28, 2023 Share Posted October 28, 2023 3 minutes ago, Sam Jones said: Not a big concern or rocket science, but I like to avoid the collecting global value, saving value, changing value, do operation, change value back collection of calls. A thought: Create a Procedure called "JonesTextPlace. In it, make all of the text settings you'd like - size, alignment, justification, etc. Bookend everything w. PushAttrs & PopAttrs. Doing that will reset values automatically. 1 Quote Link to comment
Pat Stanford Posted October 29, 2023 Share Posted October 29, 2023 I agree with the PushAttrs, PopAttrs. That will restore all the text settings as well as the attributes in two small steps. The only problem is if someone manages to "break out" of a script before the Pop then the settings will not be restored. 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.