AutoCAD Visual LISP / AutoLISP :: DCL Radio Button Label Length

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


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Update Radio Button Default Values In Dialog Box?

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

AutoCAD Visual LISP / AutoLISP :: Divide One Radio Column Into Two Radio Columns?

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

AutoCAD Visual LISP / AutoLISP :: How To Set Function To Radio Buttons

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

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 View Related

AutoCAD Visual LISP / AutoLISP :: Change Length To Match Length

May 24, 2002

Command to make a line change length to match length of a line, arc, polyline or circle? Could use this when making flat patterns layouts.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Line Length To Attribute Tag

Sep 30, 2013

Is there any simple code for to sum length of lines which is i am choosing and copying result to chosen attribute tag ?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Line Length Report

May 30, 2013

I am trying to create a report of line lengths based on linetype.

I have built a list that looks like this...

(("CUT4SS" . 859.566) ("CUT4SS" . 862.231) ("CUT4SS" . 927.651) ("CUT6SS" . 1158.48) ("CUT6SS" . 509.903) ("CUT6SS" . 2840.31) ("CUT4SS" . 967.76) ("CUT4SS" . 508.73) ("CUT4SS" . 111.065) ("CUT4SS" . 483.216))

I want to take this list and create a function to create a list of total lengths i.e. the CDR's.

(("CUT6SS" .total length)("CUT4SS" . total length))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Retrieve Arc Length From Revision Cloud?

Oct 28, 2011

Is there any way to retrieve the arc length from Revision cloud and how can we identify that object is a Revision Cloud.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Centerline Along Length Of 3D Solid Shape?

Dec 10, 2013

Lisp to draw a line along the length of a 3d solid? I have some UB (I sections) columns and beams modeled and would like to select all solids and for it draw a centerline end to end

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: List Total Length Of Polylines

Jul 30, 2012

where I can obtain a freeware lisp routine that lists the lengths of all the polylines on a specific layer or within a selection set? I want to avoid list if possible as there are rather a lot of polylines!

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Line Length To Dimension Override?

Sep 23, 2011

My goal is to be able to select a line and a dimension and then have the line's length appear as the text override for the dimension.  I have the code to substitute the variable "dist" for the dimension text:

(setq dimselected (entsel "
Select Dimension:"))
(setq newlength dist)
(command "dimedit" "n" newlength dimselected "")

but am having problems extracting the line's length to the variable and setting setting it equal to the variable.  To make things more interesting, the value needs to be in inches with fractional inches accurate to 1/16".

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Put Circle To Line After Specific Length

Oct 3, 2013

I need a lisp which is i can draw a line or pline with circle in every 30 meters ( circle diameter and total line or pline length will be optional )

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Lines Shorter Than Specify Length

Nov 8, 2002

Is there any utilities that can select the entire drawing with the 2d polyline and erase all the polyline less than specify length (eg:10m,20m etc) ?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Length From Both Side By Digit Entry?

Sep 5, 2012

i need any lisp that perform the Lengthen command from both side of Polyline by Digits Entry.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Length / Width Output Of Rectangle

Nov 26, 2013

I found a lisp in the net to create a rectangle by marking objects in a draw.

But it would nice to get at the end of the lisp after creating the rectangle a output in the command line about the length and with of the created rectangle.

who can add the code for the length/width output?
 
(defun C:wer (/ AUSWAHL INDEX ELEM XYMIN XYMAX MINX MAXX MINY MAXY DATA A) (vl-load-com) (if(and(or (and (setq AUSWAHL (ssget "I")) (> (sslength AUSWAHL) 0)) (and (setq AUSWAHL (ssget)) (> (sslength AUSWAHL) 0)) ) (or(setq A (getreal "
Randabstand <0> : ")) (setq A 0.0) ) ) (progn (setq INDEX -1) (repeat
[code]........

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Pause For Certain Length Of Time 5 / 10 Seconds

Jun 9, 2012

How do I pause for a certain length of time 5 seconds or 10 seconds.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Retrieve Length Value Of Single Entity

Feb 27, 2012

When we launch the list command, the Area system variable holds the area value of the selected shape.

How to get the length value into an Autolisp program to use it?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Label From New WCS

Jun 4, 2013

I need a lisp routine that will allow me to pick a polyline and label with azimuth and distance (direction-north, clockwise) of a new WCS.

Is there any code that extract information for a new WCS?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dialog Box Button

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

AutoCAD Visual LISP / AutoLISP :: Code Sum Lines Length / Multiplied By Constant

Aug 6, 2013

I have lisp code, which count total length, but I need that it count and multiply by constant which I choose manual (such as in example, total lines yellow length * y + total blue lines * x = ... , example 50*2 + 60 * 3=280), 

remember the another code, such as I have d200 with total l=1000 and d250 with total l=1500, i need to count total cost such as 1000*y+1500*x

one think, diameters numbers is not only 1 or 2, it can be many different diameters.

dwg file here:

[URL]..........

lisp file here:

[URL]........

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adjust Column Width To Length Of Text

Apr 27, 2012

Several times, we generate a drawing, and the text widths in the columns vary greatly.  Some have text that is ten characters long, and others have thirty-plus characters.

Is there a way to be able to select the table (or perform the command to all tables in the current layout) and have each of the columns expand to the appropriate width, that depends on the longest string of text in that column, for each column.  The problem I see, is that some tables have two columns, some have six, and of course other with any number in between.  The same is also true for the amount of rows.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Label Block With Effective Name

Apr 22, 2013

Using this  

 (setq nblock (vla-get-Effectivename(vlax-ename->vla-object block )))

I get the effective name dynamic block.
 
(if (nblock (= "test_block"));;;--->Which is the correct form? (command "_insert" "LABEL" pt1 "" "" "") );end if (if (nblock (= "test_block2"));;;;Which is the correct form? (command "_insert" "LABEL2" pt1 "" "" "" ) );end if repeat for all enames block
 
How i can  select block to insert according to effective name?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Locking Several Layers With One Button

Aug 23, 2011

What the require setting to enable me to lock of several layer continuously when i click the "LAYER OFF" button at the toolbar? I wish to set to be like whenever i use the "LAYER OFF" command, i can direct just continue to click several layers for it to be turn off.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Reactor - How To Change Xdata Length If Line Is Modified

May 18, 2010

I need a Reactor to Modify Xdata - Length - contained in Line Object if this Line is modified (stretched, breaked, trimmed, etc).The routine need to verify if Line contain Xdata and modify it (and works with multiple selection).

I tried for long hours, but without success. I tried to create a list of entities while the reactor is applied, but doing so need another reactor to change these entities after the first Reactor works.The codes I used are below:

{code}
;If it just 1 string only you want to add
(defun add_xdata_str (e a v);;;EName APPID String_value
(and (not (tblsearch "APPID" a))
(regapp a))
(and (= (type e) 'ENAME)
[code]....

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Total Length Of Selected Object And Summarize Them A Table

Jan 4, 2014

I need a lisp file that can read the total length of selected object (lignes, polylines) and summarize them by layers or by color in a table

e.g

command:tl (total length)
select objects
found total length.......
select object (Ent)
total length or [Add/Subtract/Table] :
total length = .......
if table
Enter an option by [ Layer/Color/line Type/line Weight] <layer> :

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Count Dynamic Block Including Total Length?

Apr 2, 2012

lisp to count dynamic block including total length.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Label Difference Routine Adjustments

Aug 18, 2011

I found the following lisp routine on the forums and would like to know how to make a couple changes.

1. Have two line of text with the N or S on top of the E or W.

2. Include the foot symbol after the distance

3. Have the N,S,E,W placed before the distance, ex S 0.00'

4. Eliminate the negative sign

5. Use my current text height instead of dimtxt height

(Currently using Autodesk Land Desktop 2009 and want the text to come in based on the current text style since we use several different scales and text depending on project)This is a great routine that is going to make life much easier for us.

(defun C:LBD (/ P1 P2 TX);label difference
 (while
 (setq p1 (getpoint "
Specify first point or press Enter to Exit: "))
 (setq p2 (getpoint p1 "
Specify second point: ")
 ydiff (- (cadr p2)(cadr p1))
 xdiff (- (car p2)(car p1)))
[code]....

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Label Contour (2D Plines) From Elevation

Nov 21, 2013

Of course with ACAD MAP (FDO Labels for example) or better with ACAD CIVIL : no problem !

But often I have to use a Standard AutoCAD ...

A lots of people have already asked for this routine :

But I search in this forums and some others and unfortunately I can't find any correct routine Full operational on ACAD 201X 32/64 bits

I have many 2D Plines with an Elevation : some Normal , some have been splined --> 1st problem

I would like to label them with :

- either a Block with ONE attribut : the elevation

- either a MText with a blank Mask behind

As you wish ...

Question : Size/Height of the Block or MText ?

Some 2D Plines are very long (2nd problem) so I would like a question like :

Label each Pline every xxxx Units ?

So on a Pline Contour of 2000 meters, I could have the elevation (Block or MText) every 50 meters ...

Of course I would like that the Block or Mtext will have to follow (rotation) the Pline (splined or not) where the label is inserted !

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Point Label Style

Oct 1, 2013

I am trying to use autolisp to change the point label style in autolisp. Mostly teach you how to do it manually, I not sure there is a way to do it in autolisp.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Ribbon Button - Custom Schedules

Feb 18, 2013

How to add buttons and create my own ribbon in AutoCAD, but now I would like to be able to have buttons for two different schedules that I have created. While I can have a button start the schedule command it won't automatically pick the schedule that I want it to create.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved