AutoCAD Visual LISP / AutoLISP :: Lengthen Multiple Polylines
Sep 9, 2011
Lisp (or a native way) to lengthen multiple polylines or lines at once to the same length by entering that length? I found the following lisp routine which extends a line an entered amount, but it has to be on a specific layer, and I want to enter the finished length, not how much to extend it.
(defun c:blen (/ lSet tmp doMode objLst actDoc)
;; *lDel global variable remembered during session
(or *lDel (setq *lDel 2.0)) ; default value
(princ "
>>> Select lines to extend/reduce <<< ")
(if (setq lSet
[code].........
View 3 Replies
ADVERTISEMENT
Feb 7, 2013
Is there a way or a lisp to scale multiple 3d polylines, at same time, and the base point is the start point of each one?
View 4 Replies
View Related
Jul 15, 2013
I've been looking to download a lisp that can trim (TR) and the (PE, join) polylines. two at a time or multiple... I've tried writing the lisp routine but I cannot do it correctly.. Any good lisp routine? Also, if there's one to trim & fillet w/a radius.. Hopefully there's two different routines but if there's one then even better...
View 6 Replies
View Related
Dec 12, 2011
I need to be able to convert "polylines" (as opposed to "2d polylines") to 3d polylines. Here is the issue: the polylines that I want to convert have object data attached to them and they are at the proper Z elevation. When I use the "Convert 2d to 3d polyline" function, the conversion does take place, but all of my object data is removed from the object. And since one of my attributes reflects the overall elevation of the object (which all of the verticies will be the same elevation - even though it will be a 3d polyline), there are too many objects to individually update the attribute information when I am pressed for time.I am working in Civil 3d 2010. Any way to do this using Civil 3d?
View 8 Replies
View Related
May 28, 2013
A quick lisp routine to extract the elevations of a selection set of 2d polylines? I have a massive "contour" file composed of 2d polylines with elevations. I need to find the min and max polyline elevation in selected areas. I can't figure out how to extract just the elevations of my selected polylines so I can quickly see the elevation values?
View 9 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, 2012
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!
View 2 Replies
View Related
Jan 4, 2012
I have a series of boxes or polygones that I would like the program to find the 1/2 distance and create two seperate polylines from the one object.
Example:
I have a square with pt1,pt2, pt3 and pt4 respectively. After I have ran the program it would create a diagonal from pt1 to pt3 and join the rest of the lines now to create the one polyline. Also it would do the same to create another exact polygonal shape for the other half. Thus creating two shapes of equal value from one.
View 9 Replies
View Related
Oct 17, 2011
Essentially, I'll be creating a sort of Venn diagram. So for the purposes of this exercise, let's assume it's the classic Venn diagram of three intersecting circles. But I need this to work with closed polylines, that may also have arc segments in them.
Anyway, so I have these intersecting areas, and I need to create bounding polylines for each area, and assess the number of overlaps. So, as in a Venn diagram, the areas where only one circle is present can then get shaded one color, areas where two circles are overlapping can get a different color, and the area where all three circles overlap can get a third color.
I'm clearly going to have to be converting the various boundaries to Regions, and performing some Unions. It seems I could grab all objects, convert them to Regions 2 at a time, and compare their Union'ed area to their individual area, to determine if they overlapped at all. With only the 3 cirlces, that would work, but when I have 35 individual polyline areas with arcs, suddenly this method feels like it will break down.
View 7 Replies
View Related
Feb 26, 2010
I work with polylines a lot to maintain Facility Space and I come across polylines that are overlapping. Is it possible to have a routine to find polylines that are overlapping? Sometimes I really have to zoom in pretty close to see if they are overlapping and sometimes it's pretty obvious.
View 9 Replies
View Related
May 20, 2013
There is a AutoLISP for extract START and END coordinates in X, Y, and Z planes, and extract length of Polylines and Arcs.?
View 7 Replies
View Related
Mar 5, 2013
I have few co-ordinates in notepad like mentioned below. How can i create polyline using read-line function in auto lisp.
x y
0.0,0.0
2.0,0.0
2.0,1.0
0.0,1.0
2.0,0.0
4.0,0.0
4.0,1.0
2.0,1.0
View 2 Replies
View Related
Aug 1, 2012
I need to be able to grab all polylines and change global width at once. This is a repetitve task that i have created a button for. I am trying to use this but it is not working. It gets hung up on me wanting to manually select the polylines when i thought i grabbed them with the first line.
(ssget "X" '((8 . "LayerName")))
(command "PEDIT" "w" "9")
View 6 Replies
View Related
Feb 10, 2012
I need a function that allows to convert the polylines selected with a width globalize defined in a double closed line (spaced by the same width of the polyline), with a hatch inserted automatically defined.
Brilliant idea to draw raceways quickly: instead of making handmade double lines, connect, enter the hatches all by hand, you could quickly draw the polyline with width identical to the size of the duct, and then the lisp transform it into a duct more aesthetically pleasing if compared to the full polyline!
View 9 Replies
View Related
Nov 27, 2013
have a lisp routine that will ask you the starting elevation and the elevation interval, then allows you start selecting polylines and it assigns them new elevations based on your choices?
It seems years ago I had a routine that did this and it also changed the color of the polyline so you could tell which ones you had already changed, but I can't seem to find it now.
View 2 Replies
View Related
Mar 21, 2013
I need to segregate closed polylines in my drawing by area range. Ideally, I would input the number of ranges I need.
Then somehow find the smallest and largest pline area to determine the range values (rounding up to a sensble number)
Then with the ranges determined the polylines would be segregated and moved to new layers.
I've been trying to hobble together pieces but with no joy.
View 9 Replies
View Related
Aug 27, 2013
Project involves repeatedly mirroring a line by selecting mutiple lines to do the mirroring. Probably sounds confusing.
The progress so far can be found here: [URL] ........
View 1 Replies
View Related
Jan 11, 2013
The below adds a hyperlink to the selected object.How might it have to change to add multiple hyperlinks?
(entmod
(append (entget (car (entsel)))
(list
(list -3
(cons "PE_URL"
(list
(cons 1000 "..\..\90 Submittals\90-3 O&Ms\fig83-clevishanger.pdf") ; Relative Path to a pdf file.
(cons 1002 "{")
[code]...
View 3 Replies
View Related
Nov 2, 2011
How to modify this routine so that I can select multiple objects as opposed to one at a time?
(Defun c:cd ()
(setq newdim (entsel "
Select Dimension to clear:"))
(setq newdimvalue " ")
(command "dimedit" "n" newdimvalue newdim "")
(princ)
)
View 9 Replies
View Related
Nov 3, 2008
I have a lisp I use to calculate the area of an object. The section below is the area part of it:
(setq ojt (entsel "Select object to get area of... "))
(command "area" "o" ojt)
(setq oarea (getvar "area"))
I want to modify it to add the areas of multiple objects. Unfortunately it is not as simple as;
(setq ojt (ssget "Select object to get area of... "))
(command "area" "a" "o" ojt)
(setq oarea (getvar "area"))
So how would I go about doing it?
View 7 Replies
View Related
Jul 5, 2012
i am wondering if it is possible to alter a specific attribute in cca 250 files? I have this template which has like 50-70 attributes,but not all of them are used. I have to change only one attribute in all of the files. For instance, i have an attribute with a specisfic tag, but the content of it is ie MARK, i want to change MARK to PETER, without having to open,click,retype,save,close every file. Is it possible to automatize it somehow? maybe lisp, batch or even VB?
View 2 Replies
View Related
Aug 3, 2013
I want to join multiple lines together like join command but with multi selection.
View 6 Replies
View Related
Oct 14, 2013
I have been using to copy multiple objects from x-refs. The problem I'm having is that when I have the user input prompts in a macro i can screw up the command if i accidentally miss picking my selection set. I'm new to LISP and having trouble with selection sets and selection filtering.
On another note: I'm trying to rename layers copied this way to remove the "$0$" and using the rename command swapping $0$* with * works, however in the -rename command it does not.
View 1 Replies
View Related
Dec 17, 2013
I'm using a Lisp which searches a certain folder and then updates all blocks, which are nested in that folder.
My issue is, that I'd like to use more than one folder on different path, where the LISP can search for this files. Is there a way to use multiple search path?
The code I'm using now to search for the blocks is: (setq dir "I:\AutoCAD Blöcke\Template\Support")
View 9 Replies
View Related
Apr 25, 2013
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.
View 9 Replies
View Related
Feb 7, 2012
I have a lisp routine that gathers all xrefs from the current drawing and creates a script that opens each xref, runs specific commands then saves/closes each drawing. Once all commands have been ran in each xref I would like the script to reload all xrefs in the original drawing that the script was called from. I have a reload-all lisp that is already loaded in all of my drawings but for some reason when this command is called at the end of the script it will not run.
Is there a way to have the script continue to run in the original drawing that it was called from? Or maybe even pass control back to the lisp that created/called the script? Its seems to me that the easiest thing would be to have the script continue to run after it has gone through all of the specified drawings but this is not working.
View 9 Replies
View Related
Sep 8, 2013
How can Attach multiple images into autocad .? at a time ..!!
Any lisp available ?
View 5 Replies
View Related
Oct 7, 2013
For example :
command is beginning with choices
1- choose number ... ( 10 / 20 / 30 ) :
2- choose color ... ( red / blue / cyan ) :
after choices if 1.st choice is 10 and 2.nd one is red , then run to AAA command
after choices if 1.st choice is 20 and 2.nd one is blue , then run to BBB command
after choices if 1.st choice is 30 and 2.nd one is cyan , then run to CCC command
simply like that..
View 3 Replies
View Related
Nov 27, 2012
I'm currently working on a project that requires that I eTransmit a large quantity of files, which is becoming very time consuming. I need writing a script that will allow me to etransmit all of the files at once.
My requirements:
- All .dwgs must be saved as individual .zip files with all references included.
- .zip file must have same name as associated .dwg (basically just swap extensions).
My progress:
- Seems very simple, basically my script is:
Qsave
-eTransmit
-CH
-SetupName
-C
ROADBLOCK!!!!!!! D:<
My problem is that I want to have AutoCAD return the filename sans extension and filepath when I'm prompted to input the filename for the .zip file. How can I do this? I've been looking up options using VBA, but with limited success given.
View 1 Replies
View Related
Mar 21, 2013
This time I'm wrestling with getting the values from multiple blocks. The blocks all have the same name but at least the attributes have names this time. Each block have exactly 4 attributes, like: att1 (a number representing chronological order), att2 (some data), att3 (the actual date as a string of when the data was added), att4 (some more data)
I need to get and store the attribute's values. I was hoping to make a selectionset of the blocks and step through using the chronological order number.
At this point I have tried several combinations of foreach and ssget "x" (list (cons 2 MYBLOCK)), but I keep getting errors that I'm sure are telling me that I'm not passing the correct information to the function for iterating through. I'm banging my head.
(DEFUN c:GFOR (/ ATTLST REVBLK CNT CNT1 BLK RBLK ATTVAL ATT REV#)
(SETQATTLST(LIST "R#" "INIT" "DATE" "DESC")REVBLK(ssget "x" (list (cons 0 "INSERT") (cons 2 "REVISION")))CNT0CNT10 )
(vlax-ldata-put "dict" "RevTotal" (BLKCNT "REVISIONS")) (FOREACH BLK REVBLK (SETQ RBLK (ssname BLK CNT1)) (setq ATTVAL (mapcar '(lambda (x) (vla-get-TextString x)) (vlax-invoke (vlax-ename->vla-object RBLK) 'GetAttributes))) (foreach ATT ATTLST (SETQ REV# (STRCAT "REVISION" (1+ CNT)))
(vlax-ldata-put "dict" REV# (member ATTVAL)) (setq CNT (1+ CNT)) ) (SETQ CNT1 (1+ CNT1)) ) (PRINC))
View 9 Replies
View Related
Jun 11, 2007
I ment midpoint instead of center.Is it possible to select several different line entities and have them each rotated around its midpoint, or end point, so afterwards all have the same direction specified by a number or specified by direction of another entity?I wish command matchprop had that rotation option in its Settings.
View 9 Replies
View Related