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


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 :: Suppress Igesout Dialog Box?

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

AutoCAD Visual LISP / AutoLISP :: No Attribute Dialog Boxes?

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

AutoCAD Visual LISP / AutoLISP :: Select Color Dialog Box

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

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 :: Avoiding Mesh Smooth Dialog

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

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 :: Increase Size Of Fixed Dialog Box

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

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

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

AutoCAD Visual LISP / AutoLISP :: Tool Button Image Missing?

Jul 13, 2011

I added a couple of standard Autocad MAP tabs to a custom  panel and in my custom workspace some of the button images don't show up. If I go to the Planning & Analysis workspace, the images are visible, but in the custom workspace, all I get are clouds with a question mark.

I attached two screen shots.

Civil3D 2014 SP1
Win 7 Professional - 64-bit
HP Z400
Xeon W3550 @ 3.07Ghz
24GB of RAM
Nvidia GeForce GTX 760

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Combined Commands In One Macro Button?

Jun 28, 2012

I am trying to create a short cut button with a macor code.

I want it to set up a new orgin and set a base point in xrefs i am creating

The commands i want to combined are the follwoing

UCS enter
3P enter
BASE enter

The macro i am using is the following

^c^c_ucs 3p \_base

but it wont run the base command after it finishes the 3P command

This is whats show up in my commands bar

Command: _ucs
Current ucs name:  *WORLD*
Specify origin of UCS or [Face/NAmed/OBject/Previous/View/World/X/Y/Z/ZAxis]
<World>: 3p

[Code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Making A Most Used Tool Button For Toolbar

Sep 22, 2011

I also note I could use excel but I have this thing where id like to have the lisp and AutoCAD run independent from other external programs.

I’m the CAD monkey at work and I’m given unbelievable autonomy to what I build (sometimes I confuse work with hobby) put all to one side. My functions often require toolbars with several buttons on them what I would like for one toolbar in particular is to make a most used function button. Better said a button at the beginning of my toolbar, which execute the most used button from within that entire toolbar.
 
The ideas so far is to add a write-line (append) function lisp for every button this would intern write a button codename/ reference example SNP for snap and SAV for save and so on. All easy I can do this.
 
What I’m having difficulty with is actually counting the instances of the most used button using lisp. At the moment I’m resorting to a vb.net program, which needs to be shelled first, to recalculate the whole list it works but is messy and quite patch worked. The highest instance would then be used to set a variable, which would be used as the command in the so-called “top 1 tool button”

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Loading Routine With Toolbar Button

Apr 19, 2012

I need to load a lisp routine by way of a toobar button. I do not want to use the appload dialog box.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add New / Blank Button To Custom Tool Bar

Apr 17, 2012

AutoCAD 2012

When I am in the CUI editor and I right click on a button in a custom tool bar, it gives me the option to "duplicate" or "copy".

But when I go to change the properties of the new button, it changes both the original and the new button upon "apply".

Can I just add a new/blank button? I've tried dragging a new command from the list at the lower left corner but it does the same thing. :?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dialog Image From 2005 Not Displaying In V2012

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

AutoCAD Visual LISP / AutoLISP :: Determine Which Button On A Flyout Toolbar Is Currently Shown?

Feb 13, 2013

how can I determine which button on a flyout toolbar is currently shown?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Layer Index Color Change Via Selection And Dialog Box

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

AutoCAD Visual LISP / AutoLISP :: Macro To Open Third Party Program From Toolbar Button

Feb 7, 2012

I'm trying to create a macro for a toolbar button to open a third party program. Basically we want to open a custom .exe application from a button on the ACAD toolbar.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: User Select In Button Marco Not Working In 2014?

Jul 29, 2013

I have various Button macros with the user input select in them, but in 2014 they dont seem to be working anymore.

they worked in 2013.

It just says invalid selection.

example

^C^CSelect;change;p;lt;phantom;;

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: One Button Changing Text Base Point To Be Middle Center

Aug 23, 2011

how to make a toolbar button so that when i click it and select a few single text, it will automatically change the text base point to be at "MIDDLE CENTER"....

At the moment, i use to create a button with macro of  " ^C^C_text;j;mc "....But the problem is whenever i use this button, i still need to type "MC" at the command prompt.. How to make it so that after i click the button, all i need to to is just select the text..

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Plot Transparency Option In PLOT Dialog Box

Sep 11, 2012

Where else do they keep this setting? I only have found it in Active Layout in extended dada

(entget (vlax-vla-object->ename(vla-get-activelayout (vla-get-activedocument(vlax-get-acad-object)))) '("*"))
The last pice of extended data is:
 ("PLOTTRANSPARENCY" (1071 . 0))
When i change it to 1
(setq layout(vla-get-activelayout (vla-get-activedocument(vlax-get-acad-object))))
(vla-getXdata layout "PLOTTRANSPARENCY" 'type 'data)
(vlax-safearray-fill data  '("PLOTTRANSPARENCY" 1))
(vla-setXdata layout  type data)

it stays there (extended data), but the setting in Plot dialog box doesn't change!!! And it still prints no transparency.

It takes to save the drawing and reopen it again to see the change.

The command -PLOT does not have this setting as well, so my options back to VBA or Lisp, but HOW?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Ribbon Button Image Won't Repopulate After Modifying Bitmap Image

May 21, 2013

I am updating my CUI ribbon for some of my customized buttons.  I have changed some of the bitmap images that I have saved in my network folder for the network AutoCAD customization.  However, I cannot get the Ribbon to update to show the new button images.  

I have opened the CUI, browsed down to the partial CUI for our corporate configuration, then to the "Ribbon", then to the "Tabs", then to the individual section of the tab and clicked on it.  Then I click on the specific button in the "Panel Preview" pane to get the properties for that button to show.  Then at the bottom of the "Properties" panel, I click on the "Small Image" line to see the three dots that allow you to browse to where the .bmp is stored.  I have not renamed the bitmaps, but just modified their color and the way they look.  So I have to change the .bmp file to a different location in the small image properties, then change it back to the correct image name.  It will update the appearance in the "Panel Preview", but will not update the actual ribbon.  I click on "Apply" and "OK", and it still doesn't update the actual ribbon.  I have tried closing and restarting AutoCAD after that.  As a last resort, I rebooted to see if that would complete the change, but in vain.

I made sure that the network location for the bitmap files is listed in my Options > Support File Search Path (very near the top of the support file list), but that still isn't solving the problem.

How to get AutoCAD to completely forget the old image that is showing on the ribbon and repopulate it with the updated bitmap image?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Continuous Dimension Lisp That Alternate Its Position

Jul 12, 2012

Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high?  If there is no lisp already created, how to create one? 

See Continuous dimension attachment for example.

I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add String To Each Item In List Using Lisp

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

AutoCAD Visual LISP / AutoLISP :: Opening Drawings With Default Visual Style Set To 2D Wireframe

Oct 7, 2013

Is there a way to programatically set a visual style before a drawing actually opens?

We have some huge models and people seem to forget to change their visual styles back to 2D wireframe before saving and exiting drawings.  Some models will crash on some workstations when trying to open in a rendered mode.

I found a lisp with a function that looked to set viewport visual styles.  But it does not seem to be supported anymore. --> (vla-put-VisualStyle vport 1)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Write A Lisp Routine That Invoke The Mleader Command

Oct 11, 2012

I'm trying to write a lisp routine that, when I invoke the mleader command, osmode is set to "nearest" & orthomode is set off. I then would like the original settings to be returned.

attached is what I have written so far:-

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Visual Effect Settings?

Jun 20, 2013

Lisp that switches back on Selection Preview i.e. thickens and highlights lines when you hover over them?I don't know why, but they are always unticking the boxes.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Combinations In DCL?

Sep 7, 2012

Is it possible to execute a certain command based on multiple selections withinin a dcl?  for example:  two radio colums, one with selections A and B, and a second with selections 1 and 2.  is it possible to program commands based on user selections from each column?  ex: if A and 1- do a command.  A 2- do a different command, etc...

I tried :

 (action_tile "key1" "(setq A t")
 (action_tile "key2" "(setq B t")

 (action_tile "key3" "(setq 1 t)(done_dialog)")
 (action_tile "key4" "(setq 2 t)(done_dialog)")

(if
(and (a) (1)
)
(command ...

but was unsuccessful.  no matter which combination was selected, the command under all combinations would run.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Attribute Value

Jun 3, 2013

I am trying to find a lisp that would get an attribute value (tag name = NBR_5) . I'm trying to run a simple routine that would let the user place the value from the titleblock attribute as text on a drawing. I see a ton of articles regarding getting attributes but I am not well versed in programming.

View 9 Replies View Related







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