Create button to toggle a CUI parameter

Create button to toggle a CUI parameter

dsummersPEG
Advocate Advocate
557 Views
9 Replies
Message 1 of 10

Create button to toggle a CUI parameter

dsummersPEG
Advocate
Advocate

I have grown tired of this Autocad bug linked below, and the subsequent multiple steps to fix it. I am looking to create a button shortcut or something to toggle this parameter set in the CUI, but am not sure where to begin. I tried recording a macro (Action Recorder), but it only opens the CUI without executing any of my other actions. Can someone tell me how to modify a parameter set via the CUI editor, using commandlines, instead of the CUI editor?

 

What my button should accomplish:

In the CUI, Select the Ribbon -> Tabs.  Expand the Text Editor Contextual Tab.  Then select the Multiline Text Editor - Style row. Under the properties panel, toggle between "Collapse as needed" and "Collapse last".

 

Software bug (which would take Autodesk less time to fix than it's taking me to create a workaround):

https://forums.autodesk.com/t5/autocad-forum/autocad-2017-mtext-ribbon-gets-big/td-p/6866147

0 Likes
558 Views
9 Replies
Replies (9)
Message 2 of 10

jskalaXDDX5
Advocate
Advocate

The tricky part about that would be finding the Command/Variable name(s) to write the macro...unfortunately not everything that exists in Dialogue boxes seems to have a corresponding Command Line name...I poked around a bit in the CUI and nothing jumped out...

 

Maybe a solution might be found by jogging the system in another way...long shot I suppose but free to try...


$M=$(if,$(and,$(>,$(getvar,ribbonstate),0)),^C^C_ribbonclose,^C^C_ribbon)

Will toggle the Ribbon off and on...maybe try a Regen when it is off?

 

$M=$(if,$(and,$(getvar,CleanScreenState),1),^C^C_CleanScreenOFF,^C^C_CleanScreenON)

Will toggle cleanscreen...

0 Likes
Message 3 of 10

ВeekeeCZ
Consultant
Consultant

And if you change that element to a drop-down look (here called ComboBox for some reason), does it still suffer that issue?

I can't tell, never experienced that.

 

eekeeCZ_1-1745350478723.png

 

 

 

0 Likes
Message 4 of 10

pendean
Community Legend
Community Legend

@dsummersPEG Can you explain the need for this to be a toggle option please? What's the workflow that needs these as instant (well, action recoder is not but...) options?

 

Why not turn on the MTEXT TOOLBAR instead? Go old-school, no toggling needed.

 

Message 5 of 10

dsummersPEG
Advocate
Advocate

@jskalaXDDX5 The solution of toggling the "Resize style" seems to be the most reliable, which is why I've chosen that to make a quick button to single-click and return to normal. Otherwise, a full exit and reboot is required. I've already got shortcuts to regen, audit, xref reload, and even toggle hardware accel off and back on, but none of those help. I appreciate the long shots. I'm just not sure if it's possible to access that parameter through the command line; I figured it was a long-shot, but I'd ask anyways.

0 Likes
Message 6 of 10

dsummersPEG
Advocate
Advocate

@ВeekeeCZ I'm not sure how to access that in the CUI. Could you provide a bigger screenshot, or a trail / some breadcrumbs to get there?

0 Likes
Message 7 of 10

dsummersPEG
Advocate
Advocate

@pendean Per the solutions provided in the link, changing the parameter fixes the issue. But only until it randomly is resurrected again. So, changing it is all I need it to do to save me from either closing Autocad and rebooting, or digging around in the CUI menu.

 

Also, the MTEXT toolbar is already on. Unfortunately, that's my next grievance. It often pops up right in the way of other text I need for context. Editing a cell in a table? The toolbar pops up and obscures all of the column headings, so with distractions, I forget what data I'm inputting. Some of us just have that luck; I've just learned to live with it. But the thread subject should be an easy fix, if only I knew how to access that parameter from the command line.

0 Likes
Message 8 of 10

pendean
Community Legend
Community Legend

@dsummersPEG Not sure I quite understand your toggling need, sorry. On a high-level, you may not have tested using different workspaces instead?

 

MTEXTTOOLBAR is what it is, you can't edit that ever, and honestly it never needs to be on if you also use the Ribbon as you seem to be: do you need such duplication? Is this a fear of missing something perhaps? Mine is turned off 100% of the time, I've adapted to shortcut keys, right-clicking and highlighting for the majority of my MTEXT editing.

 

FYI, Action Recorder is limited, bordering on useless for power-users, looks like you are about to (if not already) cross that threshold from noob to power-user. A good time to automate with other methods.

 

Best wishes.

Message 9 of 10

ВeekeeCZ
Consultant
Consultant

@dsummersPEG wrote:

I'm not sure how to access that in the CUI...


 

Navigate in CUI

Ribbon/Panels/Multiline Text Editor Style/Row 1/TextStyle... then in the lower right corner, change DisplayMode.

 

Then it looks like this. 

eekeeCZ_0-1745500580457.png

 

0 Likes
Message 10 of 10

jskalaXDDX5
Advocate
Advocate

jskalaXDDX5_0-1745505929860.png

Everything in LT anyway that Setvar  "Ribbon"...Will RIBBONDOCKEDHEIGHT restore?

0 Likes