AutoCAD Visual LISP / AutoLISP :: Radio Cluster To Select Next Dialog Box
Feb 20, 2012
I'm trying to set up a main dialog box with three radio buttons. the selected button will determine which 'next' dialog box appears when the next button is clicked.
(defun c:steel (/ dcl_id) (setq dcl_id (load_dialog "steel.dcl")) (if (not (new_dialog "steel" dcl_id)) (exit) ) (action_tile "angle" "(setq shape "angle")") (action_tile "beam" "(setq shape "beam")") (action_tile "channel" "(setq shape "channel")") (action_tile "accept" (cond ((= shape "angle")(c:angle)) ((= shape "beam")(c:beam)) ((= shape "channel")(c:channel)) ) ) (start_dialog) (unload_dialog dcl_id) (princ))
View 9 Replies
ADVERTISEMENT
Apr 3, 2012
Rudimentary lisp & dialog box skillls here...
I have a little dialog box with seven radio buttons and a text box that generically accomplishes what it's supposed to do. To retain the current dialog values, I use the write-lline function to store the information and then use read-line to bring that information back in for other Lisps that I use. As long as the user doesn't open the dialog, whatever options were last selected will remain in effect.
However, if the user re-opens the dialog, then whatever defaults I have initially set up in the dialog will then become active (in other words, whichever of the radio buttons I have set to "1")
My question is whether or not I can have the dialog box set up so that if a user selects an alternate radio button, that radio button will keeo it's value whether or not the dialog is opened and until and if the user changes it..
As it is now, whenever the user opens the dialog box to change, say one radio button, the user then has to change the other radio buttons if the defaults don't match the current run requirements.
Here's the dialog and the lisp:
OPTIONS : dialog {
label = " Counter to Cad Options";
: spacer {
height = 0.75;
[Code] ......
View 3 Replies
View Related
Dec 16, 2013
I want to take a Radio Column with 10 Items and make two columns of 5 Items, so that onlu one of the ten radio buttons are selected. This is aide in spacing on the Dialog Box. I am trying not to re-write the whole program, just add a few options.
I tried to add another Radio_column, it seperates it, but its two separate sections.
:radio_column {label = "Side Elevation";
fixed_width = true;
fixed_height = true;
[Code]....
View 9 Replies
View Related
Jun 21, 2013
using autolisp or visual lisp I want to open "Select Color Dialog Box" URL....and get RGB color code to my lisp.If I enter "color" in command line, i get color dialog box, but if I use this command in (command "color") I get more promts and not color Dialog Box.
I want to make a lisp routine which would ask for first color, second color and range of colors. And will calculate color range from first color to second color.
View 7 Replies
View Related
May 7, 2013
simple example code how can i set my lisp function to radio button ?
i found simple dcl - lisp codes , there is possibility for calling simple cad commands , but this is different about call lisp with buttons
which code i have to change and how for set my lisp on radio buttons ..
here is the sample codes ...
SAMPLE1 : dialog { label = "Sample Dialog Box Routine - Part 1"; : column { : boxed_column { : button { key = "but1"; label = "Button 1";
[Code].....
View 3 Replies
View Related
Jun 28, 2013
I am trying to revise an old dialog box so that I can add some new options but I'm finding it difficult to shorten the label for a radio button enough to get the box width to look reasonable. I read somewhere that Windows fonts cause the label lengths to hold extra space for each character. The webpage that I found this on said the solution was to make a new line for the label, which sounded great to me, but they did not tell how to do it. After much searching, I figured out how to add an additional line to the label, but my program now refuses to function correctly. I set the middle button before initiating the dialog in my lisp, but when I select a different option, the original button remains selected along with the user's choice. The program actually works, using the last button selected, but I really want the button to respect the pick by the user and deselect the default button.
This worked perfectly when I had only two selections, and it still worked perfectly when I added the third option, but it just doesn't like it when I try to add a new line for the long description in the middle of a radio column.
I'm barely functional with dialog boxes..
DCL in question:
:boxed_radio_column { label = "Location"; width = 20; height = 2; fixed_width = true; fixed_height = true; alignment = top; :radio_button{key = "sl-AD"; label = "Spring Lake Applications";} :text_part{label = " and Distributor Services";} :radio_button{key = "sl-BP"; label = "Spring Lake BP Systems";} :radio_button{key = "gr"; label = "Grand Rapids";} }
lisp has the following in this order:
load dialog - I have a loading function that works fine
(set_tile"sl-BP""1")
(action_tile"sl-AD" "(TGW-Setup_01 $key)")
(action_tile"sl-BP" "(TGW-Setup_01 $key)")
[Code] .....
Of course, these are just the pertinent sections of a much larger setup dialog, but I didn't think I needed to post all the functions that this program is doing, since you'd have a difficult time running this without my templates, printers and a number of support files.
Like I said, it seems to be choking on my adding :text_part { Label = " and Distributor Services";} instead of making this a single line of the label for the button above it.
Why does this cause the default radio button to stop releasing?
View 3 Replies
View Related
Feb 15, 2012
I would like to creat a dialog box with buttons or radio buttons to insert various blocks. something easy to start the dialogue, push the button desired and my block or lisp is inserted or run. I have the dcl part figured out. i'm not quite smart enough to get the lisp down. is there a generic lisp that can reference a lisp command that i can alter or edit and add to?
View 4 Replies
View Related
Feb 13, 2013
how to suppress the igesout dialog box?
I would like to supply the command inputs via autolisp i.e. (command "igesout" .... etc.
but can not seem to get the dialog to NOT appear.
-igesout does not work either....
View 1 Replies
View Related
Apr 13, 2011
I have several lisp routines that we have used since release 12 that now dont work in 2012. They all placed blocks with attributes, allowed user to fill in and continued to finish. In 2012 the attribute dialog box does not come up and point information for block placement is filled in the attributes. Is there a system variable that changes dialog boxes in 2012?
View 7 Replies
View Related
Dec 12, 2012
When using mesh smooth from AutoLisp, is there a way to avoid the dialog that comes up when the object is a non primitive 3d solid?
View 8 Replies
View Related
Oct 28, 2011
I need to increase the size of a fixed dialog box so I do not have to use the horizontal and vertical scroll bars to see the contents, I have included a picture.
View 3 Replies
View Related
Mar 13, 2012
I'm trying to bring a lsp routine up to date and it's almost as if I'm a newbie again. A dialog image worked okay in 2005 but in version 2012 displays poorly. So I made a new slide in 2012 and saved it to the same name as the old one, HobMasterDialog.sld, and placed it in the same folder as the old one. However, when the dialog appears the rectangular area for the image is blank.
What am I forgetting?
View 4 Replies
View Related
Sep 26, 2013
I have the below code, which works great accept if the layout tab doesn't have a viewport.What am I missing?
(defun ViewportLayerUpdate ()
(setq OLDcmdecho (getvar "cmdecho"))(setvar "cmdecho" 0)(setq OLDnomutt (getvar "nomutt"))(setvar "nomutt" 1)
(if (setq ss1 (ssget "X" (list (cons 0 "VIEWPORT"))))(if (setq ss (ssget "x" '((0 . "VIEWPORT") (-4 . "/=") (69 . 1))))
(command "CHPROP" ss1 "" "LA" "0-VPRT" "") ))
(if (setq ss1 (ssget "X" (list (cons 0 "VIEWPORT"))))(if (setq ss (ssget "x" '((0 . "VIEWPORT") (-4 . "/=") (69 . 1))))
(command "change" "p" "" "p" "color" "bylayer" "") ))
[code]...
Factory Design Suite Ultimate 2012
AutoCAD 2012 | Inventor Professional 2012 | Vault Professional 2012
View 3 Replies
View Related
Jun 19, 2013
Trying to add this macro to a new command in my cui. Does Select all not work in macros?
^C^Clayiso;;_select;all;;_chprop;la;c-rway-x;;
View 8 Replies
View Related
Aug 1, 2013
I'm attempting to create an easier way to change layer colors of nested linework by selecting the linework and having the ACAD index color dialog box appear to select the replacement color.
defining the "ic" variable;
(defun c:clc (/ ent ent_data ic ent_lay) ;change layer color(setq ent(nentsel)) (setq ent_data(entget(car ent)))(setq ic ;index color(cdr(assoc 62(ACAD_COLORDLG))))(setq ent_lay(cdr(assoc 8 ent_data)))(command "-layer" "c" ic ent_lay ""))
View 3 Replies
View Related
Jan 2, 2012
with a function like this I added some xdata, some MULTILEADER
(defun c:add_xdata () (princ "Select: ") (setq ogg (car (entsel))) (addXdata ogg "TEST" "CODICE" "1256") (addXdata ogg "TEST" "MATERIALE" "LEGNO") (addXdata ogg "TEST" "TIPO" "A"))
Now with the following function can only select leaders who have linked the xdata application TEST
(setq selez_all (ssget "X" '((0 . "MULTILEADER")(-3 ("TEST")))))
I can not, however, find a way to select all MULTILEADER who have a particular value of XData.
For example I would select all MULTILEADER with MATERIALE = "LEGNO" and TIPO = "A".
View 4 Replies
View Related
Feb 11, 2013
Newbie here trying to learn LISP. My first program is to flip all arcs and circles that have a Normal Z property of -1. But I'm having trouble finding a detailed list of commands and functions for the LISP language that explain creating circles to selecting entities filtered by properties. I must be searching for the wrong terminology.
View 9 Replies
View Related
Apr 10, 2012
I have the following code, that for some reason the last created dimension is no being selected. That's the first problem. The second (and not as improtant) problem( becasue it does work), is that I'm using the "dimedit" command. I prefer to do a swap within the dxf codes, that I treid but didn't work, so I resorted to the "dimedit" command.
(command "DIMLINEAR" pause pause pause)
(setq last_dim (entsel (entlast)))
(setq oldunits (getvar "lunits")) (setq oldprec (getvar "luprec"))
[Code].....
View 4 Replies
View Related
Jun 20, 2012
is it possible select all ANNOTATIVE objects in a DWG and to set a Viewport/ANNO scale for all via lisp
View 3 Replies
View Related
Mar 11, 2005
I want to explode all anonymous blocks, but how do I create a selection set of them.?(ssget "x" '((2 . "*U*"))) doesn't work, and is dangerous if you have any blocks with the letter 'u' in them.
View 9 Replies
View Related
May 22, 2012
There is a very complecated drawing. Texts are on a line and crossing a line or something like that. Some texts has insertion points on the line. When the line is selected by LISP, only the specific texts with insertion points on the line are selected. Does it make sence?
View 8 Replies
View Related
Aug 28, 2011
I am interested in a program that can select layers by its color, and then change those layers to a different color and add a prefix of Z- in front of those layers.
Example:
Layer Names: Layer Color: New Layer Names: New Layer Color:
Wall 2 Z-Wall 100
Berm 2 Z-Berm 100
Fence 2 Z-Fence 100
I found a program (below) that works pretty close to what I am looking for but not quite.
;;; Change the color of a layer to another color by Jeff Mishler July 9, 2003
;;; Usage - (lay_col_chg oldcolor newcolor
;;; example: Command: (lay_col_chg 142 100)
[code]...
View 7 Replies
View Related
Feb 6, 2012
what I'm trying to do is have the program select the block and then I want to get out of it what the Block Name is, so I can then compare it to the list of block names that I want the program to move. Here is what I was trying to use:
(setq enlist2 (ssget "_X" (list '(0 . "INSERT") (cons 10 (trans '(0 0 0) 1 0)))))(setq en (entget enlist2))
However, when I do this, I get this error message: Error: bad argument type: lentityp <Selection set: 1e02>
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 4 Replies
View Related
Feb 12, 2013
Can I select a line and get the nearest endpoint so I can do something to the line using the endpoint as a base?
It will include an ssget and an osnap "end" in the code, but not too sure how to put it together.
View 3 Replies
View Related
Jun 17, 2012
I need to wright a routine in autolisp that selects all 3Dpolylines with the same vertex Z value.Qselect as no transparent mode and filter doesn't work.
View 7 Replies
View Related
Jul 30, 2013
When you select similar using autocad it select similar in entire drawing. What i want is i am able to select similar using the same setting of selecting similar but with window selection instead of entire drawing ?
View 6 Replies
View Related
Nov 11, 2011
Lisp program, by selecting on screen multiple block attribute and to change those selected (by picking) attributes to colour 252.
At the moment, I'm using a custom macro : ^C^C-ATTEDIT C;252;;
But if I've got a lot of attributes to change, it takes awhile to complete.
I know about BATTMAN but I do not want to change the block entities in that way. The reason I want to change the attributes to colour 252 is because here at this company we do existing drawing in colour 252 and any new equipment on its proper layer colours.
View 1 Replies
View Related
May 4, 2013
I want to make it so that I can keep selecting several objects and get all the starting points and endpoints of each one with (setq ent (entsel))
(Defun c:demo (/ ent)
(setq ent (entsel))
(princ)
)
View 9 Replies
View Related
Dec 16, 2013
I would like to select blocks based on the layer of one or more attributes. The obvious method would be to isolate that layer and select the ones with attributes that display. But many of the values are empty!
View 9 Replies
View Related
Feb 3, 2012
I'm having an issue with using the SSGET to select a block so I can move it. I'm changing the UCS to be at the center of the top view in the program(user selects center) and the block is at 0,0,0 after changing the UCS. However when I use SSGET it doesn't select it. So I used:
(setq en(car (entsel "
Select a block :")))(setq enlist(entget en))
and it lists the DXF Code of 10 as
(10 15.0893 13.5165 0.0)
How can I then select it if I don't necessarily know where the block is going to be?
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 2 Replies
View Related
Aug 5, 2013
I would like to select a polyline that will either be straight or contain bulges and offset lines either side of it a prescribed amount, I have tried a couple of options that don't involve picking points on both sides to no avail.
View 4 Replies
View Related