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:
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".
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]....
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?
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
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!
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]........
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.
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 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> :
I'm trying to write a lisp routine to create a two line MLEADER but i can only get one line of text. Creating the MLEADER manually from the command line i just have to hit enter after the first line of text to add a second line. How would i do this in a lisp routine?
I am trying to draw a line between two lines and I put together the following. It works great if the start/end points are perpendicular to each other. How do I solve if line one start point is in a positive direction and line two is in a negative direction?
(defun c:test () (setq L1 (car (entsel " Select the first line: ")) L2 (car (entsel " Select the second line: ")) )
I am having a problem with starts and ends of lines. I have draw two lines, end of first is start of second. The problem is because, (cdr (assoc 11 (entget line1))) and (cdr (assoc 10 (entget line2))), somehow, are not the same,
I need to place a circle, of a user-defined radius, as a marker at the endpoints of all lines in a drawing. how to accomplish this using lisp? It doesn't matter if they overlap; I can use OVERKILL to delete those objects.
There are many lisp that draw offset line but what about opposite way , I have wall of double line i need to delete one of them let's say inside wall line .
why i need to do this usually when i tracing in external program like autocad architecture or Revit or archicad i just need outline of exterior and interior walls !.
is there way that can delete the offset line ?(or within range predefined in lisp to prevent interfering of lines deletion).
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.
Is it possible to control the UCS without using the command line? I'd like to access it and control it with vlisp much the same way I can access DXF groups and manipulate insertions. Seems like it should be possible to play with it's definition inside the object model.
I have a custom command that I can initiate (c:TxtE). The function starts running but I need to begin adding several inputs at the command line following this. (ex: "4" "all" "" "oldtext" "newtext"). How do i do that within lisp once the custom command has already begun? If I need to modify the function how would i pass all these as optional type variables?
I've written my first little Lisp function.What it's for is drawing a simple borehole profile that can then be used to draw stylized cross sections on top of it.
Upon start the lisp, pick a point on screen (to get the X coordinate [x1 below]), then enter ground level at the command line [g1 below], then enter as many thicknesses as are present in the borehole log (will vary, but typically between 3-12). These I added to a list, because that seemed to make sense when I did it.
What I want it to do then is draw a pline from x1, g1 down to the next point (x1,g1 minus the 1st thickness), then the next (x1,g1 minus the 2nd thickness) etc., to the bottom of the borehole.
Then my CAD guys can sit there, and using the borehole logs, enter the values of the boreholes and it draws them on the screen, making it easy to join th dots.
It might be good if it placed a Acad point at each point as well, but I'm not overly bothered about that at the minute.