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 was looking for a post on the subject of line and circle intersections and found one that Bill Z had posted. I decided to incorperate one of the replies into my own code. In particular Luis Esquivel's code. With some minor modifications I was able to add the onseg argument that extends intersection points for the line to the circle. I also modified it to return only one point or two points depending on the line and circle supplied and the onseg argument. It seems to work great.
; test function (defun c:go ( / ) (ed_init) (while (or (not (setq ent (entsel " [code].....
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 have double line pipe drawings but i have to change distances between of this lines in entire drawing and i was thinking that maybe there is a lisp code which can create new double line according to my specify dimensions ...
example :
Distance between lines : 100 mm
------------------------
------------------------
here is what i want to do :
1. select double line
2. specify new distance ( for example 200 mm)
3. lisp will create center line middle of the selected lines ( maybe it can ask me that this center line will be permanently or not )
4. lisp will create new double line from this centerline according to my specific distance
5. new double line layers will be the same with selected old double line
and this lisp has to work for double arc or quarter circles too.
I've had a simple lisp I've been using for years that suddenly disappeared. It required that you identify a block name, tag name, and the value that you want the tag to be. All of this is performed via command line, so it is scriptable. Since I lost it, I've been experimenting with -attedit. This command comes frustratingly close to what I'm looking for, except it only appends an existing tag, or replaces a specific string within the tag; I can't get it to replace the entire tag, regardless of its value.
1> Any lisp routine that does what I describe? or 2> How to make -attedit replace a tag value without regard to what the value currently is (like a * wildcard)?
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]........
in order to filter for a certain attribute tag named MYTAG
I am working with a custom LISP routine which reports out to a CSV file, an attribute extraction file - but I need my routine to ONLY evaluate blocks which have the MYTAG attribute tag. Then, if it passes that first check, it evaluates another list of Tags within those blocks - a list of tags which I have specified elsewhere in the code.
I am trying to modify my existing code as little as possible, and I think that if I do it at the line (which I've pasted above) - that will "pre-qualify" my selection set....
ATTACHED LISP IS THE FILE I AM WORKING WITH --- THE ACTUAL LINE I WANT TO MODIFY IS AT:
how can you get the last point you picked on a Circle because I was going to run the TTR and use the tanget command and have it exit and I need to get the point I pick on the circle
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.
The template location and file is stored in variable clienttemplate (and is not the standard template path set under options). All works okay except if I close the new drawing, when I return to the previous drawing that was current when the new drawing was created (i.e. the drawing that the routine was run from). I get the following error:
I assume this has something to do with the original routine not closing/finishing before switching to the new drawing. This is the last line of the routine:
It is working only if I have the points in the DWG. If there are no points, I receive "Unknow command DPL". Is there anything I can do in order to avoid this error?
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> :
how to quick select all the blocks from a specific layer (for instance XPTO) and export them along with their attributes, exactly as we do by quick selecting them and then, through AutoCAD Express -> Attribute Export Info, but in a script...