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.
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?
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.
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.
I have little Autolisp experience, what I need is a lisp routine that will divide a 3D Poly line to say about 1000 points and add index to the points from the start of the line to the end of the line. It is very important that the index be from the start to the end of the line, because we extract the info to excel and then use the x,y and z co-ordinate of the points on our hydraulic analysis program. We need to have the index and the x, y and z co-ordinates on our Excel sheet sorted by index and not by x, y and z.
To be more clear the 3D poly is a pipeline profile so we need to have the points in order by index and not by x, y and z.
do you know command or lisp that will do new pollyline between two polyline on 1/3 or 1/4 space between them.
I need sommething that would be faster,know is use measure on pollilines then i draw between horizontall polylines on verteks or point new pollyline and then divide it on 4 or 3 parts.
I need a function that will allow me to do a "divide" with blocks but I need the single attribute to remain intact.
I need the blocks to align with object and keep the attribute. I did get it to work with constants but the function that I need to run next failed because of the constant. My variable is preset and locked.
I need to divide thousands of lines into half, but AutoCAD divide command can only allow you to select one line at a time.Is there any way we can divide multiple lines at once.
I need a easy way to create a lot of small regions, or divide a big region in lines intersections, or a fast way to pick points inside objects.
Its like that:
imagine that you do 100 horizontal lines and then 100 vertical lines. Now you have 10.000 squares. i need a fast way to make a region in each one of then.
So its too much trouble to pick points inside each one of then. i need to divide a big region or a fast way to create Plines or objects with the little squares. And i cant use array because they aren t regular squares.
Its something that i do often, its not a one time thing. This is necessary in structure analysis modeling, i export this dwg to a dxf file, that i use on a finite element program.
I have to put some trusts between two beam. It sounds easy but i'm unable to handle the divide and round off commands in the lisp. See attachement also.
To draw my trust between the 2 beams, what I normally do, is that I manually take the distance between the two points say it's 10 000 and wrote it down. Then I divide it by my max gap, say 1200, it is the max space between trust.
10 000/1200 = 8.333333 that's the result of how much trust and space between them that i'll need, 8 trusts, 9 spaces between the 2 beams. (That is what I'm unable to do in the lisp, tell it to round off 8.333 to 9 and use 9 for divide command)
What I manually do at this point to draw these trust is that I must create a temporarly line between the 2 beams, perpendicularly to these and divide it by 9.
It gives me 8 cross (or point) to draw my trusts. All this is long to do manually because I have many bay in building and I have to redo this operation for every the bay.
So, what I would like the lisp to ask is:
Specify distance between two beams (Between where and where) :
Specify the lenght of the trust :
Specify max gap: I would like to answer a number here, say like 1200 max
(The lisp should draw the lines on the current layer, color and linetype of the current layer and not draw a line at the beginning and at the end because that's where my Beams are. I hoped you understand, see attachement.
Should also have something that handle a ESCAPE hit or cancel, something like this:
If I have a CSV file (with no header) that contains three columns and I want to return values of the second column as a list, how is the best method to do that?
I have seen something where one can separate a string into a list by a divider (in my case, the commas between the three columns) but the actual code for me to inspect was supposed to be in an attached ZIP file which I didn't see as part of the post.
I'm trying to get an excel sheet to open and count cells based on the text inside a selected column then compare it to cad. The column says "red" or "green" and I want to compare it to a count of red and green hatches in cad.
I managed to get them to be counted in cad but I'm not sure how to get the excel part to work.
Note: I posted an earlier post thinking to count the actually color in the excel cells rather than the words but that ended up being quite complicated.
I have known co-ordinates that I want each grip for the table to be set at. I can't just copy and paste the table from drawing to drawing. Each table of each drawing have different textual values, and the column widths will best be sized for each text value.
I am trying to import a list of customers from column A in an Excel file into a list for a popup_list for my Drawing Properties DCL. I am having trouble finding information on how to do this.
Basically: Load the file, (workbook through active sheet: vlax-get-property)
We've been using AutoCad for a while now , I'm just about to embark on a new project which I'm not quite sure on scale.
The aircraft I intended to model has a length of 137ft and wingspan of 140ft. Now I can't build it that big but it will probably be around 5-6ft in length once I settled on the scale I'm going to use. My question is do I draw at its original dimension and scale it in paper space or should I draw it in the size its going to be.
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.
I have blocks forming a column, and I need to allow the user to select the top block of the column but return the bottom left corner of bounding box of the bottom block in the column.
(DEFUN NXT-INSPNT (/ BLKLST CURENT CUROBJ IDX IPNT MCMD NENT SEL SS VENT) (PROMPT " >> Pick the Category HEADER to add note:") (SETQss nilss (SSGET ":E:S" (LIST (CONS 0 "INSERT"))) ) (IF ss (PROGN (SETQ sel (ENTGET (SSNAME ss 0)) iPnt (CDR (ASSOC 10 sel)) ) (princ iPNT) (setvar "attreq" 0) (VL-CMDF "-INSERT" "LEG-NOTE" "S" 1 iPnt 0 PAUSE)
[Code] ....
I'm not exactly sure where my code is failing but I get the following error.
I'm in the process of creating an online radio station and need a main 'banner' and logo creating.The URL for the website is URL....The words that I want to have on the banner are:
-Nonstophits -More Music, More Variety!
Then we need quite a funky logo - this website is aimed at people in their 20s - 30s.Also can I have the banner in 2 edits:
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.
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?
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)
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.
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.
I'm trying to delete a middle column from a JPEG of a page of text columns without leaving a blank space where the column used to be. Viewing the page as three rectangles -- the rectangle to the left of the unwanted column, the rectangle containing the unwanted column, and the rectangle to the right of the unwanted column, I want to eliminate the middle rectangle and join the right rectangle directly to the left rectangle.
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")
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.
I'm trying to find acceptable point values to feed to the vlax-3d-point function for a vla-addmtext function. With vanilla lisp I just provide the point as x y = "7/32" "2-3/8". So I assumed that I could drop a 0 in for the z like: (VLAX-3D-POINT "7/32" "2-3/8" 0).
Then I thought I was going to be tricksy and try (vlax-3D-point (getpoint)) believing that I could pick the point and get what I need to feed the function, but yet again, no deal. The command line gave me:
node of #<variant 8197 ...>
Nothing I can use in my code. So how do I find the point in a format that vlax-3d-point will like?