AutoCAD Visual LISP / AutoLISP :: Trim Then Join Polylines

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


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Join (All To Pline)

Sep 26, 2013

In continuation with thread All to Pline . I want to add one more function to this lisp i.e. Join all the objects selected.

Can this be done?

I tried this:
(command "_.pedit" "m" ename "" "j" ename "")or (command "_.pedit" "" "j" ename "" "")
 
But it gives me an error something like this:

Requires numeric distance, two points, or option keyword.
; error: Function cancelled

Enter fuzz distance or [Jointype] <0.000>: j

Enter join type [Extend/Add/Both] <Extend>: *Cancel*

or

Command: ch2pl

Select objects: Specify opposite corner: 5 found

Select objects:

*Invalid selection*
Expects a point or
Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Multiple]:
; error: Function cancelled
Select polyline or [Multiple]:
Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype
gen/Reverse/Undo]: *Cancel*

Command: Specify opposite corner:
Command: *Cancel*

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Join Multiple Lines Together?

Aug 3, 2013

I want to join multiple lines together like join command but with multi selection.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Scale Multiple 3D Polylines

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

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 View Related

AutoCAD Visual LISP / AutoLISP :: Converting Polylines To 3d Polyines

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

AutoCAD Visual LISP / AutoLISP :: Extract Elevations Of Polylines

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

AutoCAD Visual LISP / AutoLISP :: Polyline Offset Trim And Erase?

Oct 8, 2013

I've been looking for a lisp program.  I've tried to mix-and-match code to come up with a working lisp but nothing is working. I am using a polyline rectangle to start with, offsetting it out 0.75 outward, and triming everything outside of the offset and erasing the offset. 

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Trim Selected Text(s) With A Divisor?

Feb 2, 2013

I need a program to trim selected text(s) with a divisor.

suppose that the divisor character is: "/"

(selected text==>result

textL/textR ==> textR

xxx/yyy     ==>yyy

t12x/5678  ==>5678

I should use some commands like:

;;;;div="/":

(setq str "xxx/yyy")
(setq pos (vl-string-position (ascii "/") str))
(setq len (strlen str))
(setq RGT (substr str (+ pos 2) (-(- len pos)1))) ;;=text after "/"

but I need a LISP program that:

1-ask user to give a divisor char: (Divisor character: </>)

2-ask user to select text(s) but program should filter selected text(s) with divisor (*/* pattern)

(if (null #div#)(setq #div# "/"))
(if (and
(setq #div# if (= (setq tmp (getstring (strcat "
Divisor character: <" #div# "> ") ) ) "" ) #div# tmp ) )
(setq ss (ssget "_:L" (list '(0 . "*TEXT") (cons 1 (strcat "*" #div# "*")))))
)

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select All 3D Polylines With Same Vertex Z Values

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

AutoCAD Visual LISP / AutoLISP :: List Total Length Of Polylines

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

AutoCAD Visual LISP / AutoLISP :: Creating Two Closed Polylines From One Shape

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

AutoCAD Visual LISP / AutoLISP :: Create Sub Areas From Intersecting Polylines

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

AutoCAD Visual LISP / AutoLISP :: How To Have Routine To Find Polylines That Are Overlapping

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

AutoCAD Visual LISP / AutoLISP :: Data Extraction From Polylines And Arcs

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

AutoCAD Visual LISP / AutoLISP :: How To Create Polylines Using Notepad Coordinates

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

AutoCAD Visual LISP / AutoLISP :: Change Width Of All Polylines On Specified Layer Using Script?

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

AutoCAD Visual LISP / AutoLISP :: Convert Polylines Into Double Lines With Hatch

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

AutoCAD Visual LISP / AutoLISP :: Assign Elevations To Polylines Sequentially At A Set Interval

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

AutoCAD Visual LISP / AutoLISP :: Line Trim - Draw Lots Of Plumbing Plans

Jan 9, 2013

This is to trim a line that crosses another.  I draw lots of plumbing plans.  It draws a circle based on 'dimscale', trims a line to that circle, then erases the circle.  The problem is if you miss the trim point (PT2) it does not erase the circle and you lose your object snaps.

;Pipeline Break
(Defun C:bb (/ s1 ds1 r1 PT1 PT2 AX)
  (setq s1 (getvar "osmode"))
  (setq ds1 (getvar "dimscale"))
  (setvar "osmode" 63)
  (setq r1 (* ds1 0.03125))
  (setq PT1 (getpoint "
[code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Segregate Closed Polylines In Drawing By Area Range?

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

AutoCad :: How To Join Four Polylines

Feb 21, 2013

Just can´t find out how to join these 4 polylines:

Bank.dwg

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Continuous Dimension Lisp That Alternate Its Position

Jul 12, 2012

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.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add String To Each Item In List Using Lisp

Nov 14, 2013

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?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Opening Drawings With Default Visual Style Set To 2D Wireframe

Oct 7, 2013

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)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Write A Lisp Routine That Invoke The Mleader Command

Oct 11, 2012

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.

attached is what I have written so far:-

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Visual Effect Settings?

Jun 20, 2013

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.

View 4 Replies View Related

AutoCAD 2010 :: Unable To Join Polylines

Feb 29, 2012

why I cannot join the various polylines in the attached example? My objective is to create 2 closed polylines, Line 1 and Line 2.

View 1 Replies View Related

AutoCad 2D :: Polylines Will Not Trim Or Extend To Arc

Aug 31, 2011

These polylines will not Trim or extend to the arc. Works fine if I Explode them to lines. Z=0 also.

View 4 Replies View Related

AutoCad :: How To Trim Large Amounts Of Polylines

Oct 25, 2013

I am finishing up the exterior design of a building which consists out of metal plating which should be laser cut with a pattern. Now I drew the lines for the laser cutter as a template which will fit the pattern into the contours of the exterior design. Only problem which occurs is that my pattern, which I have group to easily copy, creates very slow desktop performance.

How to I external trim all the groups at once because it does not seem to do this. I can´t attach the cad-file because manager won´t let me. but it trimmed some of the group but not all the lines in them. How is this possible? I've tried blocks but they don't clip either.

View 5 Replies View Related

AutoCad :: Make Join Command Work Only On Lines Or Polylines?

Aug 14, 2013

I Wonder if it's possible, with a setting or something like this, to make the join command work only on lines or polylines that had the same linetype?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved