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


ADVERTISEMENT

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 :: 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 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 :: 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 :: Set Plot Scale By Annotation Scale?

Aug 9, 2012

I am working on automating page setups in model space and am looking for a way to set the plot scale equal to the annotation scale for scaled drawings with

(setvar "filedia" 0)

(setq a (getstring (getvar "cannoscale")))

(command "-plot" "YES" "MODEL" "" "" "" "" "" "" !A "" "" "" "" "" "" "_Y" "_N")

Setting the plot scale with !A causes the lisp to fail.  However, when running each prompt through the command line individually, !A works fine.  what is missing?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Quicker Alternative Changing Annotative Scale In Object Scale List

Apr 10, 2013

I would like to find a lisp that changes the scale of something that has an annotative scale and deletes all other scales in the object scale list.  Often i have many different scales of existing dimensions or objects. i waste a lot of time opening the annotation object scale dialogue box, selecting add, finding my scale and deleting the old scale. 

View 3 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 :: 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 Visual LISP / AutoLISP :: How To Get Viewport Scale

Feb 2, 2012

I am adapting a routine by Alan J Thompson found here for placing an outline of a paperspace viewport in modelspace.

I have added some lines for making a suitable No plot layer with appropriate linetype, and wanted to make the lwpolyline have a thickness dependent upon the viewport scale.

My paperspace viewport scales are set for printing via Zoom - 1/50XP for example to get a 1:50 scale plot (or 0.02XP)

Having selected the relevant viewport, I wanted to be able to determine the vp scale, but am unsure how to extract this information from the viewport entity itself.

The routine was as follows:-

(defun xpfact ()
(- (car (trans '(1 0 0) 2 3))
(car (trans '(0 0 0) 2 3))
)
)
--

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Annotation Scale To 1:2

Apr 26, 2013

take a look at the test.dwg it contains a block named 'box' (which is a rectangle) and some attributes. the annotation scale is 1:1 and i zoomed in to focus on one attribute.

change the annotation scale to 1:2 and you will see the attribute grows by 2 - that's ok! now load attmod.lsp and run attmod command and you will see the attribute grows again by 2

even the command only (entmod) the attributes without making any change.(to restore it use battman sync)Is there a workaround to this bug?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multileader Scale Variable

Oct 10, 2008

A2008. Is there a setvar, setenv, registry entry etc. that can be used to change the scale of Multileaders with annotative off to have the same effect that DIMSCALE has on Q leaders? I want to have a single scale-independent Multileader style and modify it on the fly along with DIMSCALE and LTSCALE. I'd use Qleader but UCS's do odd things to text position and orientation.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set All Lines And Plines Scale To 1

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

AutoCAD Visual LISP / AutoLISP :: Annotative Drawing Scale

Apr 26, 2012

I am attempting to create an AutoLISP that removes all un-used drawing scales from a file, then adds the standard scales used in civil engineering. This is what I tried using:

;;;Add Engineering Scales
(defun C:AES ()
 (command ".CANNOSCALE"
   "1" = 1'"
 (command "-scalelistedit"
[code]...

Now, I am only a beginner to writing LISP, but I know that my problem is that it is reading the inch marks after the one in the scale name as a enter, but I don't know how to get around this. Also, I don't know how to get it to skip scales that are still in the drawing.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Make Block Uniform Scale?

Oct 8, 2009

Is there any way to make a block uniform scale using lisp? and also make a block drawing uniform scale?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Scale Text Objects

Jan 8, 2014

Any Lisp Routine to scale text objects a certain value and have the program actually scale each text object as you pick them.

The change text height using the Properties function does not work for what I need because the objects I need to scale are Mtext objects with Background Mask, and when you use the Properties function to change their text height it messes up the background mask so that you have to select each text entity and stretch the mask area smaller or larger, but if you use the scale function it scales the background mask as well so the background mask coverage is still the same.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Scale Changes Upon Inserting Block In The Drawing

Jul 17, 2013

I had been trying to insert a title block (block) in to a drawing as part of changing the title block But in some drawings the block gets scaled off. Is there any system variable or any solution to maintain the drawing without getting scaled while inserting block.

I had used -dwg units and this appears to single drawings only. Any other way to do this to all the files in a folder.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Setting A Custom Scale On Viewports

Aug 29, 2012

I have a problem that I cannot seem to solve.  I have a drawings with a whole bunch of layout tabs that have a few viewports in each tab. One of these viewports on each layout tab is on the layer VIEWPORT. I did this so it would be easy to filter out the other viewports in the drawings. I am using the code below to change all of the viewports with the layer VIEWPORT to the Custom Scale 0.020833. This works for all of the layout tabs except the first tab. It will not for some odd reason work on the fist tab. 

(setq vieportfilter (list (cons 0 "VIEWPORT")))
(setq ssetvp (ssget "x" vieportfilter))
(setq cntrp 0)
(while (< cntrp (sslength ssetvp))
[code]..........               

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Rotate Block Current Annotative Scale ONLY

Dec 6, 2011

I have the below code (from a user here on the forum) which works great for aligning text, mtext and blocks to 2 points.  For annotative entities, it respects the rotation angle for mtext and text. 

ie I have an mtext object at 1"=20' scale and at 1"=40' scale.  I run the command when the current annotative scale is 1"=40'.  The object at 40' scale has changed, but the 20' scale is unchanged.  This is working as I would like it to.

But for annotative blocks, it gets weirded out.  In the above example, the block at 40' will rotate, but so will the attributes at 20' scale.  But linework and hatching at 20' scale will be unchanged.  it looks really weird. how to get it to play nice with blocks.  Ideally, I'd like the block to be at different rotation angles in different annotative scales.

(defun C:R2P (/ ss ang edata); = Rotate objects to align with 2 Points (setq ss (ssget '((0 . "*TEXT,INSERT"))) ang (angle (getpoint "
First alignment point: ") (getpoint "
Second alignment point: ")) ) (repeat (sslength ss) (setq edata (entget (ssname ss 0))) (entmod (subst (cons 50 ang) (assoc 50 edata) edata)) (ssdel (ssname ss 0) ss) ))

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: CANNOSCALE Value Needs To Match Existing Named Scale

Jan 18, 2012

The crux of the matter is that the CANNOSCALE value needs to match an existing named scale.  This lisp is part of a bigger lisp and I need to pass a variable into it.  Here's what I have:

(setvar "CANNOSCALE" (strcat "1" = " (rtos variable 2 0) "'"))

But I get this error when I try to run it.

; error: bad argument type: numberp: nil

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Setting Option For 1"-30' Viewport Scale

Oct 18, 2013

calculation a viewport scale of 1"=30'.

I've looked around and only find nearly what I looking for. For 1"=20' I have a value of 0.004167 Paper Units = 1 Drawing Units, but what is the formula to calculate 1/30"=1'-0"?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create Polygon Viewport At Specific Scale

Apr 25, 2013

I'd like to run one command that allows the user to draw a polygon viewport then sets that VP to 1/8"=1'-0".

It can be nearly accomplished with a macro, but falls just short because the polygon vp requires an unknown number of clicks, so there is no way to know how many pauses for user input in the macro.

View 6 Replies View Related







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