AutoCAD Visual LISP / AutoLISP :: How To Select Several Plines And Export Their Vertexes
Jun 29, 2012
Yesterday I post the message "Exporting pline and text" which turned out to work realy well.
However I need something else...
I need to select several plines and export their vertexes (as it is already done) BUT I also need to select SEVERAL texts and export them as well as their insertion point coordinates.
I tried with the code below but without any success... It gives the error "; error: ActiveX Server returned the error: unknown name: "TEXT"" This happens after selecting some texts and hiting enter.
Here is the
(defun c:zi5 ( / f i o s ss obj objdata texto texto_f nomebase nome_zi tx1 iPt)(vl-load-com)(setq nomebase (getstring "
Enter name for file:"))
(setq nome_zi (strcat "D:" nomebase "_zi.txt"))
(princ "Select your plines...")
(if (and (setq s (ssget '((0 . "LWPOLYLINE")))) (setq f (open nome_zi "w")) )
[Code]...
View 5 Replies
ADVERTISEMENT
Sep 13, 2012
I need to change the color of all lines/plines that intersect a given pline. How would I go about making the selection set of all lines that intersect that given pline.
View 8 Replies
View Related
Jul 15, 2013
I am working on a script. I need to select all lines and polylines and set there linetype scale to 1.
I'd take a simple lisp routine if that would be easier.
View 9 Replies
View Related
Sep 10, 2013
I have to create some plines in a drawing from the inputs provided by the client. I prepared a lisp code for it. I have to use it to 1000 drawings. Every time I open the drawing and running the lisp command.
Is any lisp code to run in bulk open drawings with out entering command prompt.
View 2 Replies
View Related
Feb 27, 2012
I'm looking for something that, after selecting several plines (overlaped or not), I can insert/remove vertexes.
View 9 Replies
View Related
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
Aug 9, 2013
In attempting to follow a YouTube tutorial, working on a cone shape in vertex mode, when I select a single or row of vertexes, all vertexes get selected. When this happens, I note the coloring ranges from yellow at the selection point(s) graduating to black furthest away.
From this, I assume I have some other parameter/ mode invoked which I am unaware of.
View 1 Replies
View Related
Sep 26, 2013
I have the below code, which works great accept if the layout tab doesn't have a viewport.What am I missing?
(defun ViewportLayerUpdate ()
(setq OLDcmdecho (getvar "cmdecho"))(setvar "cmdecho" 0)(setq OLDnomutt (getvar "nomutt"))(setvar "nomutt" 1)
(if (setq ss1 (ssget "X" (list (cons 0 "VIEWPORT"))))(if (setq ss (ssget "x" '((0 . "VIEWPORT") (-4 . "/=") (69 . 1))))
(command "CHPROP" ss1 "" "LA" "0-VPRT" "") ))
(if (setq ss1 (ssget "X" (list (cons 0 "VIEWPORT"))))(if (setq ss (ssget "x" '((0 . "VIEWPORT") (-4 . "/=") (69 . 1))))
(command "change" "p" "" "p" "color" "bylayer" "") ))
[code]...
Factory Design Suite Ultimate 2012
AutoCAD 2012 | Inventor Professional 2012 | Vault Professional 2012
View 3 Replies
View Related
Jun 19, 2013
Trying to add this macro to a new command in my cui. Does Select all not work in macros?
^C^Clayiso;;_select;all;;_chprop;la;c-rway-x;;
View 8 Replies
View Related
Jan 2, 2012
with a function like this I added some xdata, some MULTILEADER
(defun c:add_xdata () (princ "Select: ") (setq ogg (car (entsel))) (addXdata ogg "TEST" "CODICE" "1256") (addXdata ogg "TEST" "MATERIALE" "LEGNO") (addXdata ogg "TEST" "TIPO" "A"))
Now with the following function can only select leaders who have linked the xdata application TEST
(setq selez_all (ssget "X" '((0 . "MULTILEADER")(-3 ("TEST")))))
I can not, however, find a way to select all MULTILEADER who have a particular value of XData.
For example I would select all MULTILEADER with MATERIALE = "LEGNO" and TIPO = "A".
View 4 Replies
View Related
Feb 11, 2013
Newbie here trying to learn LISP. My first program is to flip all arcs and circles that have a Normal Z property of -1. But I'm having trouble finding a detailed list of commands and functions for the LISP language that explain creating circles to selecting entities filtered by properties. I must be searching for the wrong terminology.
View 9 Replies
View Related
Apr 10, 2012
I have the following code, that for some reason the last created dimension is no being selected. That's the first problem. The second (and not as improtant) problem( becasue it does work), is that I'm using the "dimedit" command. I prefer to do a swap within the dxf codes, that I treid but didn't work, so I resorted to the "dimedit" command.
(command "DIMLINEAR" pause pause pause)
(setq last_dim (entsel (entlast)))
(setq oldunits (getvar "lunits")) (setq oldprec (getvar "luprec"))
[Code].....
View 4 Replies
View Related
Jun 20, 2012
is it possible select all ANNOTATIVE objects in a DWG and to set a Viewport/ANNO scale for all via lisp
View 3 Replies
View Related
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
Mar 11, 2005
I want to explode all anonymous blocks, but how do I create a selection set of them.?(ssget "x" '((2 . "*U*"))) doesn't work, and is dangerous if you have any blocks with the letter 'u' in them.
View 9 Replies
View Related
May 22, 2012
There is a very complecated drawing. Texts are on a line and crossing a line or something like that. Some texts has insertion points on the line. When the line is selected by LISP, only the specific texts with insertion points on the line are selected. Does it make sence?
View 8 Replies
View Related
Aug 28, 2011
I am interested in a program that can select layers by its color, and then change those layers to a different color and add a prefix of Z- in front of those layers.
Example:
Layer Names: Layer Color: New Layer Names: New Layer Color:
Wall 2 Z-Wall 100
Berm 2 Z-Berm 100
Fence 2 Z-Fence 100
I found a program (below) that works pretty close to what I am looking for but not quite.
;;; Change the color of a layer to another color by Jeff Mishler July 9, 2003
;;; Usage - (lay_col_chg oldcolor newcolor
;;; example: Command: (lay_col_chg 142 100)
[code]...
View 7 Replies
View Related
Feb 6, 2012
what I'm trying to do is have the program select the block and then I want to get out of it what the Block Name is, so I can then compare it to the list of block names that I want the program to move. Here is what I was trying to use:
(setq enlist2 (ssget "_X" (list '(0 . "INSERT") (cons 10 (trans '(0 0 0) 1 0)))))(setq en (entget enlist2))
However, when I do this, I get this error message: Error: bad argument type: lentityp <Selection set: 1e02>
If needed: AutoCAD 2013 User using Visual LISP for editing LISP and DCL files
Also I have AutoCAD 2011 currently still available for us, but we are using AutoCAD 2013 for 99.9% of AutoCAD use
View 4 Replies
View Related
Feb 12, 2013
Can I select a line and get the nearest endpoint so I can do something to the line using the endpoint as a base?
It will include an ssget and an osnap "end" in the code, but not too sure how to put it together.
View 3 Replies
View Related
Jun 17, 2012
I need to wright a routine in autolisp that selects all 3Dpolylines with the same vertex Z value.Qselect as no transparent mode and filter doesn't work.
View 7 Replies
View Related
Jul 30, 2013
When you select similar using autocad it select similar in entire drawing. What i want is i am able to select similar using the same setting of selecting similar but with window selection instead of entire drawing ?
View 6 Replies
View Related
Nov 11, 2011
Lisp program, by selecting on screen multiple block attribute and to change those selected (by picking) attributes to colour 252.
At the moment, I'm using a custom macro : ^C^C-ATTEDIT C;252;;
But if I've got a lot of attributes to change, it takes awhile to complete.
I know about BATTMAN but I do not want to change the block entities in that way. The reason I want to change the attributes to colour 252 is because here at this company we do existing drawing in colour 252 and any new equipment on its proper layer colours.
View 1 Replies
View Related
May 4, 2013
I want to make it so that I can keep selecting several objects and get all the starting points and endpoints of each one with (setq ent (entsel))
(Defun c:demo (/ ent)
(setq ent (entsel))
(princ)
)
View 9 Replies
View Related
Dec 16, 2013
I would like to select blocks based on the layer of one or more attributes. The obvious method would be to isolate that layer and select the ones with attributes that display. But many of the values are empty!
View 9 Replies
View Related
Feb 3, 2012
I'm having an issue with using the SSGET to select a block so I can move it. I'm changing the UCS to be at the center of the top view in the program(user selects center) and the block is at 0,0,0 after changing the UCS. However when I use SSGET it doesn't select it. So I used:
(setq en(car (entsel "
Select a block :")))(setq enlist(entget en))
and it lists the DXF Code of 10 as
(10 15.0893 13.5165 0.0)
How can I then select it if I don't necessarily know where the block is going to be?
If needed: AutoCAD 2013 User using Visual LISP for editing LISP and DCL files Also I have AutoCAD 2011 currently still available for us, but we are using AutoCAD 2013 for 99.9% of AutoCAD use
View 2 Replies
View Related
Aug 5, 2013
I would like to select a polyline that will either be straight or contain bulges and offset lines either side of it a prescribed amount, I have tried a couple of options that don't involve picking points on both sides to no avail.
View 4 Replies
View Related
May 6, 2012
How can i select/highlight all items in a Multi_select list_box?
View 4 Replies
View Related
Sep 23, 2011
i am trying to select a dynamic block by its name but it does not work
(setq WW (ssget "x" (list (cons 2 "WET WELL"))))
View 8 Replies
View Related
Sep 13, 2011
I need a command that will allow the user to select a layout tab. I thought the following would work, but it just ends the LISP program:
(command "layout" "s" pause)
View 9 Replies
View Related
Dec 2, 2013
I need to make all the obj like one pol after I select them all not just the last one so I can get the intersection of each obj1
(DEFUN C:CHF ()
(vl-load-com)
(if (not (member "geomcal.arx" (arx)))
(arxload "geomcal")
)
(command "undo" "BE")
(setq osm (getvar "osmode"))
(setvar "osmode" 0)
[code]....
View 5 Replies
View Related
Nov 23, 2011
How I can select all layers using the command line?
I am going to write a piece of lisp which will reset all the lineweights for all layers to default and have started by doing it manually on the command line to see what I need to automate.
To start with I choose -layer then LW then type default and it is here I have a problem. It asks enter name list of layers for lineweight default which is where I need to choose all.
View 3 Replies
View Related