I'm using ChatGPT to try to create a simple macro to switch between fractional and US architectural on a selected dimension (horizontal or vertical). I prefer to not see the feet dimensions for under 12". I know you can turn off the leading 0 but it still leaves the foot mark and the dash which looks worse in my opinion, so I spend a lot of time using the drop down to switch to fractional when needed. A macro set to a hotkey would be extremely useful and quicker but so far ChatGPT is not having an easy time creating a macro. Does anybody have some info that I can use to push ChatGPT into the proper path?
I don't have time to test it right now without being late for dinner, but looking at the API stuff...
You might look at the DimensionLinear.Style property.
These are the available values for cdrDimensionStyle.
Edited to add: Sorry to report that, when I try to change that property using VBA, it does not work.
Sadly, that's not the first time that I have seen a problem when trying to change dimension properties using VBA.
In this thread, Mek showed some other ways of getting at some of this stuff through properties of the style, but I don't know if / how that could be used to address what you want to do.
Hey Brute-Fish I too struggled with this recently as I was faced with the same issue when trying to create a macro to do this exact same thing. Then I decided to search through the commands options to see if this function could have a shortcut assigned to it and low and behold I found one. The screen shots are attached to what I have now assigned to a shortcut key. Just select the dimensions you want changed, hit your shortcut and a dropdown menu appears at your cursor, and then you can pick from the list. Granted it doesn't just switch all the dimensions on the current page, they have to be selected first. But I have a macro setup that can select all the dimensions on the page then I can just use my shortcut. Hope this helps. Cheers!
I thought this was going to be a good option but it doesn't work for my dimensions. I'm assuming because they are set with a style. The popup doesn't appear. If I use a default dimension in a blank document, it appears as you posted. It does give me an idea about applying styles with a hotkey to follow up, but I'm currently switching to a new desktop so I have to get my stuff transferred before I can look into this problem again. Thanks for the info.
I was afraid it would be hard to do rather than ChatGPT just not knowing how to do it. I'm going to look into it more once I finish switching to my new PC. Montana gave me an idea to follow up with too. Thanks for the info.
I use a macro to change to ft. Only way I could make it work was using SendKeys and assigning a shortcut to the dimension units. Your steps would be, find all dimensions, SendKeys (shortcut to dimension style alt+ds), SendKeys down 2 or 3 depending on your needs, SendKeys enter.