<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AutoCAD Menus for specific environments. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6433793#M130628</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/450014" target="_self"&gt;Shneuph&lt;/A&gt;,&amp;nbsp;&lt;/SPAN&gt;My only concern with&amp;nbsp;loading and unloading a menu, is that the workspace designates what menus will show up. So if one is unloaded, the one that is reloaded may not necessarily show up because it's not listed in the workspace. Would I need to have all of the different menus need to loaded into the workspace but only the chosen one will show up&amp;nbsp;and the rest "unresolved"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also, &amp;nbsp;&lt;SPAN&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/43171" target="_self"&gt;scot-65&lt;/A&gt;&amp;nbsp;I had thought about the ratio buttons, but this is for plotting, and I want to limit the amount of buttons the User has to click before they plot. The pull-down menu seems to be a little quicker in my opinion than a dialog box poping up. click the drop down, and then the preset papersize to their plotter/printer.&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN&gt;"to swap POP's, one must know both the Alias and Element ID of the POP's&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;EM&gt;&lt;SPAN&gt;in order for the new POP to replace an existing POP."&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;Could you explain what POP is? I am not familiar with the term POP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the info.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jul 2016 13:59:10 GMT</pubDate>
    <dc:creator>CSM_MAI</dc:creator>
    <dc:date>2016-07-13T13:59:10Z</dc:date>
    <item>
      <title>AutoCAD Menus for specific environments.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6432006#M130625</link>
      <description>&lt;P&gt;Is there a way to have only certain menus show up in AutoCAD without having a different workspace? For example, when utilizing a server based AutoCAD support file setup for multiple offices, Is it possible for AutoCAD to&amp;nbsp;startup,&amp;nbsp;&amp;nbsp;look for i.e. computername, subnet, etc. and then based on what it finds, load a custom pull-down menu designated for that office? Correct me if i'm wrong, but I don't believe you can load a .cuix file during startup? I have the info to pull the computername or subnet, but I don't know what is involved in potentially loading a custom menu based on what it finds.&amp;nbsp;Thanks for any info.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 17:48:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6432006#M130625</guid>
      <dc:creator>CSM_MAI</dc:creator>
      <dc:date>2016-07-12T17:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Menus for specific environments.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6432633#M130626</link>
      <description>&lt;P&gt;This is pretty much pseudocode; by no means a solution.. &amp;nbsp;But if I were going to attempt what you want I it's how I would start.. &amp;nbsp;I'm not certain&amp;nbsp;if you will be able to do this in the ACAD.lsp at startup either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(vl-load-com)
(setq tlv-mg (vla-get-menugroups (vlax-get-acad-object)))
(cond
  (;cond office a
   (= subnet? "office A");office identifier
   (if (setq Unloadthis (vla-item tlv-mg "Menu Name I don't want"))
     (vla-unload unloadthis)
     );if
   (if (not (vla-item tlv-mg "Menu Name I want Loaded"))
     (vla-load "C:\\Path\\Menufile.cuix")
     );if
   );cond A
  (= subnet? "office B");office identifier
   (if (setq Unloadthis (vla-item tlv-mg "Menu Name I don't want"))
     (vla-unload unloadthis)
     );if
   (if (not (vla-item tlv-mg "Menu Name I want Loaded"))
     (vla-load "C:\\Path\\Menufile.cuix")
     );if
   );cond B
  );cond&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used this website for reference: &amp;nbsp;&lt;A href="http://entercad.ru/acadauto.en/" target="_blank"&gt;http://entercad.ru/acadauto.en/&lt;/A&gt; &amp;nbsp;It may come in handy. &amp;nbsp;The blocks are all links and if you click them you'll get more detailed information on the objects and how to use visual lisp to manipulate them.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/254620iC8FD1B96E0A21549/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="MenuGroups.jpg" title="MenuGroups.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 22:36:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6432633#M130626</guid>
      <dc:creator>Shneuph</dc:creator>
      <dc:date>2016-07-12T22:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Menus for specific environments.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6432648#M130627</link>
      <description>&amp;gt;&amp;gt; load a custom pull-down menu&lt;BR /&gt;&lt;BR /&gt;It is possible to swap POP's based on a discipline however, one might&lt;BR /&gt;need to set a flag in a place such as SETCFG/GETCFG to know which POP&lt;BR /&gt;to display. I'm not sure computer name or subnet is the way to go - a list&lt;BR /&gt;will have to be maintained. Perhaps set up a DCL with Radio Buttons and&lt;BR /&gt;let the user set upon first time use?&lt;BR /&gt;&lt;BR /&gt;To swap POP's, one must know both the Alias and Element ID of the POP's&lt;BR /&gt;in order for the new POP to replace an existing POP. Remember, POP&lt;BR /&gt;positions and count will vary between workstations and not set to a fixed&lt;BR /&gt;number or order. The Alias is used to do the swapping and the Element ID&lt;BR /&gt;is used to get the position of the POP to be replaced.&lt;BR /&gt;&lt;BR /&gt;(can you tell I have encountered this?)&lt;BR /&gt;&lt;BR /&gt;If not SETCFG, perhaps set up a Pull-Down (with keyboard support) that lists&lt;BR /&gt;all custom POP's and let the user choose which one to set [is how we do it here].&lt;BR /&gt;&lt;BR /&gt;A few versions back Autodesk gave all of us a heads up that POP swapping&lt;BR /&gt;will no longer be supported (an API thing?). For now we are swapping until&lt;BR /&gt;that dreaded day...&lt;BR /&gt;&lt;BR /&gt;???&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Jul 2016 22:47:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6432648#M130627</guid>
      <dc:creator>scot-65</dc:creator>
      <dc:date>2016-07-12T22:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Menus for specific environments.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6433793#M130628</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/450014" target="_self"&gt;Shneuph&lt;/A&gt;,&amp;nbsp;&lt;/SPAN&gt;My only concern with&amp;nbsp;loading and unloading a menu, is that the workspace designates what menus will show up. So if one is unloaded, the one that is reloaded may not necessarily show up because it's not listed in the workspace. Would I need to have all of the different menus need to loaded into the workspace but only the chosen one will show up&amp;nbsp;and the rest "unresolved"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also, &amp;nbsp;&lt;SPAN&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/43171" target="_self"&gt;scot-65&lt;/A&gt;&amp;nbsp;I had thought about the ratio buttons, but this is for plotting, and I want to limit the amount of buttons the User has to click before they plot. The pull-down menu seems to be a little quicker in my opinion than a dialog box poping up. click the drop down, and then the preset papersize to their plotter/printer.&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN&gt;"to swap POP's, one must know both the Alias and Element ID of the POP's&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;EM&gt;&lt;SPAN&gt;in order for the new POP to replace an existing POP."&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;Could you explain what POP is? I am not familiar with the term POP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the info.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 13:59:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6433793#M130628</guid>
      <dc:creator>CSM_MAI</dc:creator>
      <dc:date>2016-07-13T13:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Menus for specific environments.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6434938#M130629</link>
      <description>&lt;P&gt;Is it possible to change the filepath to a partially loaded customization file via lisp? something with (findfile "xxxxx.cuix") and set a new file path?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 21:54:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6434938#M130629</guid>
      <dc:creator>CSM_MAI</dc:creator>
      <dc:date>2016-07-13T21:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Menus for specific environments.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6434992#M130630</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/671374"&gt;@CSM_MAI&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;"...&lt;/SPAN&gt;So if one is unloaded, the one that is reloaded may not necessarily show up because it's not listed in the workspace."&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;AFAIK, workspace settings control the visibility of items like toolbar objects (Which have a "visible"&amp;nbsp;property that can be set with your lisp). &amp;nbsp;PopupMenus have methods called InsertInMenuBar and RemoveFromMenuBar; so after you load your MenuGroup from the file you could control how its items&amp;nbsp;are&amp;nbsp;shown in the menubar as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you do this with lisp and the workspaces are set to automatically save it may go pretty smoothly. &amp;nbsp;You'll probably get toolbars popping into strange places at first though.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 22:38:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6434992#M130630</guid>
      <dc:creator>Shneuph</dc:creator>
      <dc:date>2016-07-13T22:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Menus for specific environments.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6435025#M130631</link>
      <description>My hint on the dialog box is to set the pull-down (POP) the first&lt;BR /&gt;time a workstation executes AutoCAD. Use that dialog to store&lt;BR /&gt;the discipline setting and forget it.&lt;BR /&gt;&lt;BR /&gt;Did I misunderstand your original post?&lt;BR /&gt;I understood what you wrote as your organization has several&lt;BR /&gt;divisions where each division has a specific pull-down. You want&lt;BR /&gt;the ability to set the pull-down according to the division's&lt;BR /&gt;discipline and not be able to see any other division's pull-down?&lt;BR /&gt;&lt;BR /&gt;???&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Jul 2016 22:58:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6435025#M130631</guid>
      <dc:creator>scot-65</dc:creator>
      <dc:date>2016-07-13T22:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Menus for specific environments.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6435139#M130632</link>
      <description>&lt;P&gt;I misunderstood your comment. Yes, that is exactly what I am looking for. Like you said, have ratio buttons for each office, and depending on which button is selected, it will then populate the appropriate menu. I am familiar with DCL, Ratio buttons, lists and such, but I don't have any idea on how to make it work for menus. Like you said, the First time AutoCAD is ran, it will pop up a DCL box, Choose the office, then that will change the appropriate menu settings. If you can provide any information on the last part I would be most appreciative. If the DCL would run a common lisp, that would probably be better for me as I am not versed in &amp;nbsp;.net or visual lisp. Thanks for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.autodesk.com/view/ACDLT/2016/ENU/?guid=GUID-2BA35BC5-2E52-4A10-8D67-A71EE449ED88" target="_blank"&gt;http://help.autodesk.com/view/ACDLT/2016/ENU/?guid=GUID-2BA35BC5-2E52-4A10-8D67-A71EE449ED88&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I could probably use some of the information in the link above.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 00:52:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6435139#M130632</guid>
      <dc:creator>CSM_MAI</dc:creator>
      <dc:date>2016-07-14T00:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Menus for specific environments.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6437181#M130633</link>
      <description>&lt;P&gt;Ahhh... that link. I think I wore down those words by endless re-reading.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following spoiler is how to find and set the POP. The argument is the&lt;/P&gt;
&lt;P&gt;new Alias name. The list you need to build is your "custom" Element ID's&lt;/P&gt;
&lt;P&gt;which can be found in the fourth pane, inside the CUI. Highlight the&lt;/P&gt;
&lt;P&gt;desired pull-down in the first pane to activate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;;;&lt;BR /&gt;;;==== FUNCTION Set Dwg Mode Menu Bar POP (also removes stray DM POP's) =====&lt;BR /&gt;;; Argument is [POP alias name].&lt;BR /&gt;(defun MENUBAR-POP-SWAP ( a / b f n ELID )&lt;BR /&gt;&amp;nbsp;(setq b nil)&lt;BR /&gt;&amp;nbsp;(vl-catch-all-apply (function (lambda ()&lt;BR /&gt;&amp;nbsp; (vlax-for menu (vla-get-menubar (vlax-get-acad-object))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (setq b (cons (substr (vla-get-TagString menu) 9) b)) ;"Element ID"&lt;BR /&gt;&amp;nbsp;))))&lt;BR /&gt;&amp;nbsp;;*** For each "Drawing Mode" POP to be added, add the "Element ID" to this list. ***&lt;BR /&gt;&amp;nbsp;(setq ELID (list "292C2" "11001" "B185C" "2225A" "9789C" "84D56" "91EE8" "126F2"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "E6690" "98056" "4A7AC" "21D28" "4FF39" "FED66" "EEB50" "B347F" "72FFA"))&lt;BR /&gt;&amp;nbsp;(setq n 1 f nil)&lt;BR /&gt;&amp;nbsp;(foreach x (reverse b)&lt;BR /&gt;&amp;nbsp; (if (member x ELID)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (if (not f)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (progn (menucmd (strcat "P" (itoa n) "=" a))(setq f n)) ;swap menu&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (progn (menucmd (strcat "P" (itoa f) "=-"))(setq f (1- f))) ;remove stray&lt;BR /&gt;&amp;nbsp;&amp;nbsp; );if&lt;BR /&gt;&amp;nbsp; );if&lt;BR /&gt;&amp;nbsp; (setq n (1+ n))&lt;BR /&gt;&amp;nbsp; (if f (setq f (1+ f)))&lt;BR /&gt;&amp;nbsp;);foreach&lt;BR /&gt;&amp;nbsp;(if (not f) (menucmd (strcat "P" (itoa n) "=+" a))) ;display if none found&lt;BR /&gt;&amp;nbsp;(setq b nil f nil n nil ELID nil)&lt;BR /&gt;);end MENUBAR-POP-SWAP&lt;BR /&gt;;;&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This also will remove additional stray pull-downs and add the pull-down if there is no&lt;/P&gt;
&lt;P&gt;matching pull-downs from inside the element ID list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason I am giving this away is that I had help from other&lt;/P&gt;
&lt;P&gt;members of this community develop this block of code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as the DCL, it should be pretty basic and straight forward. I'll help you along with that as well.&lt;/P&gt;
&lt;P&gt;Hint: Assign allow_accept to each button as well as having the ok_cancel;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 22:52:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6437181#M130633</guid>
      <dc:creator>scot-65</dc:creator>
      <dc:date>2016-07-14T22:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Menus for specific environments.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6438714#M130634</link>
      <description>&lt;P&gt;You have certainly guided me in the right direction. Thanks again for this information.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 13:23:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-menus-for-specific-environments/m-p/6438714#M130634</guid>
      <dc:creator>CSM_MAI</dc:creator>
      <dc:date>2016-07-15T13:23:07Z</dc:date>
    </item>
  </channel>
</rss>

