AutoCAD Visual LISP / AutoLISP :: List Of Workspaces For Menu Files CUI And CUIX
Dec 8, 2013
Retrieving a list of Workspaces from menu files .cui and .cuix
The function to use is (workspacelist) which returns a list of workspace names, similar to (layoutlist) for retrieving a list of Layout names.
The functionality for extracting "WorkspaceRoot.cui" from .cuix requires copying the .cuix to .zip so that it can be accessed as a Windows compressed (zipped) folder which the Windows object "Shell.Application" provides.
Please rename the attachment to .lsp
I received the following error when I tried to post the .lsp: "The contents of the attachment doesn't match its file type."
View 3 Replies
ADVERTISEMENT
Jan 1, 2010
I read Robert Bell's document “Migrating from MNU to the CUI” (Autodesk University 2007) with interest. I have been using 2005 up until now and I am finally forcing myself to get to grips with 2010.
I managed to get it to work after much trial and error through the CUI transfer interface.My customizing makes use of a lot of swapping pull-down menus, which swap in and out based on current later setting.A typical command would be:
(MENUCMD "P15=RCASPOPS.mfireeqp") where RCASPOPS is my swapping menu loaded at POP15.
Then I would use (MENUCMD "P15=*") to force the “mfireeqp” area of the pull-down menu to display.Trouble is, when I CUIload RCASPOPS, it does not seem to recognize the various areas of the menu.Here is a part of that subsection of RCASPOPS:
***MFIREEQP
[FireProtEquipLayers]
[--]
[0]0;
[defpoints]defpoints;
[X-Refs]x----ref;
[code]...
Typically the whole of RCASPOPS is loaded but when I try to force it to display, the whole of it pops on the screen (well, the top of the file does anyway) and not just the subsection I want.
Is this a syntax issue with the newer AutoCad?Also notice that I use the -> and <- for fly-out sections of the menu - is there a syntax issue with this? I notice that the future support of drop down swapping menus is not guaranteed. What is the alternative?
View 7 Replies
View Related
Apr 7, 2012
I have some legacy menus that are quite large. I have tried to create a new workspace, and that seemed to work o.k.
UNTIL I used menuload to try to load the old menu. At the point all the defualt workspaces were wiped out somehow.
I would like to have access to both the default workspaces and then also by switching to a custom workspace, my legacy menus.
View 8 Replies
View Related
Oct 29, 2013
I would like to update a CUIX and rename it, both the file name and the internal customization group name/description. The main issue is that the associated MNL file will fail to load after the renaming.
The internal name is currently the same as the file name with spaces replaced by underscores.
I have tried the CUIX transfer method, I have tried simply renaming the file and leaving the internal name alone, I have also tried renaming to .ZIP, and modifying the one file inside that contains the internal name/description, recompiling the ZIP and renaming back to CUIX.
As stated above, using any of the above methods the main issue is that the associated MNL file will fail to load. This is with Civil 3D 2014. Also the customization group name may appear in the CUILOAD dialog without underscores and depending on the method the ribbon tabs will not even appear.
I've also noted that the MNL file associated with the partial CUIX loads twice in Civil 3D 2014 and only once in AutoCAD 2013. I haven't done further testing on that.
This is mainly cosmetic as our current CUIX has 2011 in the name and I would like to update to 2014.
View 1 Replies
View Related
Oct 7, 2012
I have created to new profiles: Pro1 & Pro2.
I also have 2 new .cuix's, they were made automatically when I menuloaded my old .mns files. They are called Cu1 andd Cu2
I want Pro1 to contain Cu1 &
I want Pro2 to contain Cu2
The problem I am having is when I menuload any cuix file it appears in each profile, It has been so long since I did this that I can't figure.
[URL]
View 2 Replies
View Related
Aug 24, 2012
My cuix file that I have created won't load automatically anymore.
View 3 Replies
View Related
Aug 19, 2012
I have list like (C:projectspr0310.dwg C:projectspr0315.dwg C:projectspr03drawings17.dwg)
Want these three files deleted from C:projectspr03.
View 9 Replies
View Related
Jun 5, 2013
We are using .cuix file which gives access to tools in custom .arx file in AutoCAD 2012/2013. We load the menu using the .bundle mechanism and the plug-in - using button from the menu. If the user is Administrator (or executes AutoCAD as Administrator) the menu, toolbars and ribbons are loaded correctly and the user can load and unload the application (lisp function in .mnl file is used for that), but if the user is not an administrator either the menu, toolbars and ribbons are not correctly loaded or they are loaded, but the user can not load the application.
We have found that a probable cause for this behaviour is that AutoCAD tries to create/renew the .mnr file when first loading a .cuix file and since the user has no administrator rights this can't be done in the "C:Program FilesAutodeskApplicationPlugins" folder where the bundle is and AutoCAD creates the .mnr file in its own support folder ("C:Users<User>AppDataRoamingAutodeskAutoCAD 2012R18.2...Support") together with a copy of the .cuix file and changes the path for loading the .cuix file to this location. Since the .mnl file containing the function for loading/unloading is not copied with the .cuix file the application can not be loaded.
The user has to delete the created files under the support path of AutoCAD, unload the .cuix file and then reload it from the correct location to resolve the problem. Restarting AutoCAD leads to the same problem.
Is there a way to prevent this behavior other then running AutoCAD as administrator (that is not always an option)?
View 3 Replies
View Related
Oct 17, 2013
I'm able to add custom panels/buttons into the Ribbons, by cloning the existing ribbon (from acade.cuix) into my partial cuix. However.. I'm not able to add more commands to the shortcut menus, using the same technique.
Is it possible to add custom commands to existing shortcut menus using a partial cuix?
View 3 Replies
View Related
Jul 15, 2013
I have a list -
(setq List1 (list "Line A" "Line B" "Line C"))
I would like to add each item in an existing list to a new list -
(setq ListNew (list "This is some text" "This is more text"
the following is the part I can't figure out - it just adds the list to the list, not the individual items
(mapcar '(lambda (x) x) List1)))
I am looking for ListNew to be - (a list with 5 strings)
"This is some text"
"This is more text"
"Line A"
"Line B"
"Line C"
View 9 Replies
View Related
Nov 13, 2011
Is there a way to toggle between customized old style menus and new style workspaces?
View 1 Replies
View Related
Nov 14, 2013
I have a list ("temp.dwg" "temp2.dwg") and would like to add the string "insert text here" into each item in the list resulting in ("insert text heretemp.dwg" "insert textheretemp2.dwg"). how would i go about doing that using LISP?
View 2 Replies
View Related
Aug 17, 2012
I have a list that contains data like this,
"Tree-01-08-AA5"
"Tree-04-12-QV"
"Tree-10-30-QS"
How would I go about sorting this list by AA5, QV, QS? I know how to use vl-sort and reverse, but I do not understand how I would go about this.
View 9 Replies
View Related
Aug 26, 2012
I have a list like ("a.dwg" "b.dwg" "c.dwg") and an filename "b.dwg"
I want to know if the file name is a part of the list. which function must be used for this?
View 5 Replies
View Related
Oct 13, 2013
I need to modify the code below.
When I run the command and write the scale, I need to change the name of the scale and the ratio automatically. The ratio should always be in the format "1: #", also the name of the scale. Maybe assigning more variables with "setq", I do not know.
(defun c:test ()(setvar "cmdecho" 0)(setq name (getint "
Type the scale you need:"))(setq ratio (strcat "1:" "0.1"))(command "-SCALELISTEDIT" "Add" name ratio "Exit")(setvar "cmdecho" 1)(princ))
View 6 Replies
View Related
Jul 11, 2013
Here's one that I could use on that i can't figure out:
I have a list of a bunch of descriptions that looks like this:
("00.02.00" "CTD01 Mainframe PT1 (top)" "GD01")
What I am doing is grabbing the middle item and i need to break this up into 2 lines. So, my code below grabs the first 3 "words" in the second item in the list and puts them in a list, but I need to convert this back to a string.
(setq desc6a (list (car (read (strcat "(" (cadr input6) ")" )))(cadr (read (strcat "(" (cadr input6) ")" ))) (caddr (read (strcat "(" (cadr input6) ")" )))))
I tried a bunch of ways but can't get it
View 8 Replies
View Related
Apr 25, 2013
I've been experimenting with lists and I'm curious about the fastest / easiest way to get the next element from a list:
Currently my best shot is to wrap (member 2 '(1 2 3)) with: (car(cdr (member 2 '(1 2 3))))
View 9 Replies
View Related
Jun 27, 2012
How can I get the position (POPn ) where a menu is, considering the other menus loaded (ACAD, Expres.. etc)
For example:
File Edit View Insert . .Express WIndow Help DOBLADO PCSMEN. .. and I need to know the position of DOBLADO.
View 7 Replies
View Related
Jan 6, 2012
How to export to a txt file a list containg all the objects on the current layer and their properties?
To be precise, I would like to export the following items from a selection of plines:
- ObjectID;
- Start Point;
- End Point;
- Vertex Points;
- Width.
View 3 Replies
View Related
Jul 17, 2012
Here is the code snippet from my program, I am trying to build a associative list from two regular lists in the while loop. Does ""append " or "cons" only work for simple lists? Given attributeNameList attributeValTypeList which are always of the same length
(setq listCntr 0)
(while (<= listCntr (length attributeNameList))
(setq attrTagTypeAssnList (append attrTagTypeAssnList (list ((nth listCntr attributeNameList) (nth listCntr attributeValTypeList))) ))
(setq listCntr (1+ listCntr)
)
How can I dynamically build the association list.
View 2 Replies
View Related
Sep 17, 2013
I've created a list and want to subtract all the values within it from another variable, and assign it to a new variable. How do I do it?
Basically, I ask for ground level (assigned to variable G1), and then any number of depths beneath that (assign to list LVLLIST), and I want to return the value of the bottom point. So it's all the values in LVLLIST added together and subtracted from G1. And assign it to a new variable BASE.
For example,
G1 = 650.00
LVLLIST = (1.23 23.26 0.13 50.23)
(setq BASE (- G1 LVLLLIST))
View 2 Replies
View Related
Oct 7, 2011
In the example given I have two instances to show how unique the information can be.
I would like the left column of words to be some type of drop down or list so that the user does not have to type these for each line. I don't care if it's attribute, text, mtext, just whatever gets it done.
View 6 Replies
View Related
Jun 11, 2013
I want to list all of loaded lisp programs in AutoCAD (both .lsp and .fas) It's easy for .ARX files: (vlax-safearray->list (vlax-variant-value (vlax-invoke-method (vlax-get-acad-object) 'listarx)))
View 9 Replies
View Related
Dec 5, 2012
I have the following string of code, that I'll write in everyone's start-up suite. I'm able to retrieve a list of files I want to modify, for whatever reason. (One example, when plotting drawings with layouts, sometimes the shadeplot setting is wireframe, and not classic hidden, though it's been set up in our templates).
The huge question is, can I get a list of drawings to a variable in one drawing, and have access to that variable list, in the next drawing I open? I'll iron out the bugs on read-only statuses, or manipulating drawing states later.
(defun GetDrawings ()
(setq currentpath (getvar "dwgprefix"))
(command "pspace")
(setq DrawingList (dos_getfilem "Select a file" currentpath "Drawing files (*.dwg)|*.dwg|All files (*.*)|*.*||"))
(setq ListOfDrawings (cdr DrawingList))
(setq DrawingPath (nth 0 DrawingList))
[code]...
View 1 Replies
View Related
Dec 11, 2013
I want to make a list of layers due to their index (order) in the "layers combo box" in the AutoCAD. I prepared this:
(defun c:ListLayers ( / a b)(setq a(list(cdr(assoc 2(tblnext "layer" T)))))(while(setq b(tblnext "layer")) (setq a(append a(list(cdr(assoc 2 b))))));while);end
But, It's not match with the order of layers.
View 9 Replies
View Related
Feb 3, 2012
I'm looking for a lisp routine that will globally list all the values from a specific attribute tag within a specific block. The attribute tag is "COMMENT" and the block name is "FSD".
View 9 Replies
View Related
Aug 15, 2011
How can I determine what was selected in the pop-up box and then using that for 1 of 2 things, either 1) Turn off the Edit Box for Hole Spacing if the selected option is 1(which would be value = "0" of the popup list) or 2) Making the portion where it confirms that the Hole Spacing Edit Box is filled out so that if the Pop-up List displays 1, it doesn't check the Hole Spacing Box. Below is the DCL and LISP that I'm currently using.
Here is my current DCL:
questions :dialog {label = "Information for Program";: row {: column {: boxed_radio_row {key = "Galv";label = "Galv Slot Required?";: radio_button {key = "Y"; label = "Yes"; value = "1";}: radio_button {key = "N"; label = "No";}}: boxed_radio_row {key = "Bevel";label = "Is Leg to Face
[Code].....
If needed: AutoCAD 2013 User using Visual LISP for editing LISP and DCL files Also I have AutoCAD 2011 currently still available for us, but we are using AutoCAD 2013 for 99.9% of AutoCAD use
View 6 Replies
View Related
Jun 14, 2013
How can I sort an association list?
for example:
(setq lst '((1 . "s") (12 . "t") (-7 . "u") (0 . "v")))
should be sorted as:
((-7 . "u") (0 . "v") (1 . "s") (12 . "t"))
{ sort on: (car(assoc index lst)) value}
View 9 Replies
View Related
Feb 12, 2011
Searched NG and did not find anything.
Given a list remove from list if both (nth 0) and (nth 5) are duplicates in list
(setq dolist '
(("CABLE, MIL-C-24640/18D " "IAF" "A/R" "FT" "6145-01-224-9183" "-" "3XSOW-7" "C-LC(1), (2)")
[Code]....
View 9 Replies
View Related
Oct 31, 2013
I am unsure why my Lisp does not work.
(DEFUN C:Clear_values (/ GLBLS) (SETQGLBLS '(*DATEDRAWN* *DRAFTNAME* *JOBNUMBER* *OWNERNAME**JOBCOE* *PERMITREVDATE* *PERMITCONTACT* *HOMEBUILDER**SUBDIVISION* *ADDRESS**CITY* *STATE* *ZIP* *LOT#**PARCEL#* *NSCOORD* *EWCOORD* *STANDARDDETAIL#**SUPERNAME* *SALESMAN**GATECODE* *HOMEPHONE* *WORKPHONE* *ALTPHONE1**ALTPHONE2* *EMAIL1* *EMAIL2* *ACCESS**EXCAVATIONTYP* *EXCATDEMO1**EXCATDEMO2* *SKIMRUN* *AWLRUN*
[code]....
I've tried several options such as (mapcar 'set GLBLS "%%") but nothing happens, and with the above code nothing happens; the code only returns nil.
View 8 Replies
View Related
Oct 30, 2013
I have tried to find information about this, but I am having a hard time. So i need to explain what I am doing.
I would like to be able to use commands stored in the cui menu file, initially this is done using our tablets, but our tablet drivers cannot work with windows 7 and autocad, nor can i get any that do, (i have tried over 20 different drivers).
So, instead of making a lisp function for every macro. I need to be able to use some of them.
Can I execute one of these macros using "MENUCMD" ? , I have all the information i need to do it but cannot figure it out menucmd does not seem to have an option to actually run the macro, and if it does It only seems to be able to do that with popup menus.
Currently i use the ribbon and add them in there, but want to know If i can do so just with lisp. and create my own on-screen tablet menu.
Here is an example of one of the macro's in the cui i need to use.
And here it is in the cui menufile:
UNDER-> <MacroGroup Name="User">
<MenuMacro UID="MMU_WT1[A-5]">
<Macro type="Any">
<Revision MajorVersion="17" MinorVersion="1" UserVersion="1" />
<ModifiedRev MajorVersion="17" MinorVersion="2" UserVersion="1" />
<Name xlate="true" UID="XLS_6804">WT1[A-5]</Name>
<Command>^C^CDTEXT C .125 0 </Command>
</Macro>
So.. that is my question how can i use that command via lisp..
View 9 Replies
View Related