AutoCAD Visual LISP / AutoLISP :: Auto Dimension Closed Polyline
Mar 8, 2013Is there a command or a lisp that will automatically dimension each side of a closed polyline at once? See attachment for image.
View 1 RepliesIs there a command or a lisp that will automatically dimension each side of a closed polyline at once? See attachment for image.
View 1 RepliesIs there a routine that I could use to count the blocks that are in a closed polyline? The blocks may have or not one or more attributes.
In a previous session I saw a routine which was counting the blocks which had attributes in them, but it doesn't really work, because some of the blocks dont have attributes.
Also is there a routine that counts the different texts that are in the same polyline?
I've have code to test if the insertion point is within a closed polygon. But prior to testing the insertion point I use ssget to trim the selection set initially..
(ssget "CW" Pnt_List (list (cons 0 "INSERT")(cons 2 BlockName)))
this requires that the whole Crossing Polygon is visible, so I do a zoom first. This requires time. Is there a way I can do this that does not require the zoom?
I'm trying to look for a LISP command where i will create a closed polyline with 4 sides in different angles. then convert it to region.
View 6 Replies View RelatedLSP file i downlaoded from web.it is to use for Area with (m2) and room name. by click polyline.
i want to modify it to use without adding Room Name, just insert area to the drawing.
(defun drtxt (/ rn tx ls vl lt ht lb hb nr pt)
(setq tx (strcat "Area: "
(rtos (/ (getvar "area") 1000000) 2 2)
" m2"
)
rn (getstring "
Room Name: ")
[code]....
Does any Lisp routine available to batch replace all the closed polylines with an existing block?
View 9 Replies View RelatedI would like to take all the vertices out of a multiple-vertices polyline so that it reduces to just its start and end points, can this be done?
View 4 Replies View RelatedDue to modeling purposes, I need to convert a 3D polyline to a spline. What I have been doing is:
- change polyline fit/smooth to cubic from properties
- convert polyline to spline by typing spline -> object
- method -> fit from properties
You can see the original 3D polyline (green) and the resulting spline (magenta) in the attached drawing.When I zoom in and measure the distance between the two entities at different points along them, at some points the perpendicular distance exceeds 5 millimeters, and I want to ensure the deviation remains under 1 millimeter or even less.
I know I can change the knot parameterization of the spline, and this does work at some locations, but the difference increases at others.Why is there a 5.6 mm difference between the spline fit point and 3D polyline vertex, as measure in the attached drawing?
Now, I can go and manually stretch the fit point to coincide with the vertex. Also, I can add fit points between existing ones to drag the spline closer to the original 3D poly.
However, some of my polys are really long, and it is very time-consuming to do this manually while measuring points along the entities to make sure the distance stays small enough.
how to automate this process? For example a lisp that would maybe take the original vertex points, add say maybe 3 (not too many) new ones between them, and then generate a spline while making sure the deviation is less than the set value of 1mm? I am using AutoCAD 2013.
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.
I'd like to get areas from all closed loop polygons of my drawing and save them.
From my point of view, the function would be to:
- hatch every polygon of my drawing
- for each hatch do
- extract area and put it in an array with the variables (name of polygon and area).
And then is it possible to save it in a DWG or DXF file in order to reuse these areas by another program ?
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.
this is a Offset cutting plane line I want it to be all polylines but I can't get the ename of the end points of the polylines dose anyony know how
(defun ccp (/ pt2)
(SETVAR "CMDECHO" 0)
(setvar "angbase" 0)
(setvar "angdir" 0)
(command "polarang" 1)
(setq pt1 (getpoint "
[Code]....
Is it possible to determine the sum of the lengths of all of the polylines on a certain layer? I'm trying to determine the total length of joint sealant on a building's exterior.
View 8 Replies View RelatedI am using acad 2010. I have a contour generator that uses 3d polylines to make contours. I get depressions or tops where I don't want them. I need a lisp routine that will allow me to adjust the z value only on any 3d polyline. I need to raise or lower the z value at any vertex and repeat if necessary. I don't need to prompt the user- I am the user.
View 2 Replies View RelatedI create contour line in TOPOGRAPH program, and I import these polylines to AUTOCAD. I have to set elevation for each polyline manually, and I waste a lot of time doing that.
So looking for lisp doing that automatically. I mean, invoke the command, set the first elevation and them select the polylines.
e.g. The first elevation is 530. The next polyline that I select is 531 and so on.
For the sake of editing, I sometimes make LWPOLYLINES and convert them to regions so that I can union and subtract and intersect, etc.
then sometimes, like now, I want to work with them like as LWPOLYLINES again.
is there some command I don't know, or some routine or shall I make one?
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.
is there a way to draw a polyline and have autocad clip everything outside of that polyline and discard it so that i end up with a smaller drawing. only the information in that polyline, nothing outside of the polyline
View 3 Replies View RelatedI've been searching on and off all morning for a lisp routine, without any luck. I'm trying to draw a pline with a pre determined width (5") and be able to draw unlimited line segments then automatically fillet with a pre determined radius (5").
I wrote this generic macro: ^C^CPLINEWID;5;PL;\\;FILLET;R;5;F;P;LAST; to save SOME time but I want unlimited line segments. Can this be modified or would a lisp be the better route to go?
Code below, for labeling polyline areas
It works great for what i want, with 2 exceptions the text is to small and the label is not inserted at the centroid of the polyline, rather it is placed outside the polyline.
i am able to increase the text style by adjusting the dimscale before i run the command, however it would be good if the program could do that automatically, i would like the text to be about 300 units high, and for the label to be placed at the centroid of the polyline
(defun C:AT ( / ss i)
do you know command or lisp that will do new pollyline between two polyline on 1/3 or 1/4 space between them.
I need sommething that would be faster,know is use measure on pollilines then i draw between horizontall polylines on verteks or point new pollyline and then divide it on 4 or 3 parts.
i.e. one that would apply best fit lines and arcs to a segmented polyline?
View 4 Replies View RelatedI have to intersect polylines "POLYLINE" and "LWPOLINE" with a line and get all the angles of all segments of the polyline that are intersected.
To do this I used a loop that monitors all the vertices of each polyline to find the two vertices of the polyline segment that intersects the line. Unfortunately, these polylines have thousands of vertices and the processing done in this way takes too long.
With the vlax-curve-getClosestPointTo I could very quickly find the vertex of the polyline closest to that intersected with the line, but I need to find the other vertex of the polyline segment to determine the angle of this.
Another question: is there a quick function that returns the exact point of intersection of two curves (e.g. A line and a polyline, or a line and a circle?
I´m looking for opportunities to can modify a polyline with 4 or more segments in a polyline with arc. I think it´s possible to pick start and end segment first and than all straight segments to will be in arc segments.
View 6 Replies View RelatedCreating a ribbon for Partial Customization files in the CUI, and I am trying to setup some buttons for existing polylines for example underground electric and overhead electric. When writing the macro what are some ideas for creating a polyline with the proper linetype for that particular object rather than changing the layer in layer properties dialogue.
View 9 Replies View RelatedI have a closed polyline that i can add the area to via a field in mtext using the options under area. I would like the area to always be rounded down to the nearest square meter. Is the a way to do this via the acfields.fdc file?
View 8 Replies View RelatedI have to go through quite a few drawings and extract the attribute vales of the whole drawing and then a subset contained within a couple of polylines.
The whole drawing is Ok as I can use at out or the data extraction, but its the ones contained within a polyline. How do I do that?
i need a vlisp program to draw polyline between two blocks.
View 3 Replies View RelatedI have run into a little trouble in trying to figure out how to create a arc polyline with entmake. I've put together the following and it works great with command "pline". I just want to know how to do it with entmake.
(defun C:22 ()
(setq P1 (getpoint "
Specify first point: ")
P2 (getpoint P1 "
Specify next point: "))
[code].......
Id like to append a file with the following text...
(load "C:/ICT/GEBERIT/LSP/GEBERIT.LSP")
Quotation marks and all but how do i Handel them and the open and closed brackets using the following lisp example
(setq f(open "C:/ICT/AutoCAD_Architecture_suite_2012/LSP/acaddoc.lsp" "A"))(write-line "(load "C:/ICT/GEBERIT/LSP/GEBERIT.LSP")" f)(close f)
I urgently need a program that can auto number panels for a large drawing I have. I have a lisp program for auto numbering but we need each insertion of text to start with a P i.e. P1, P2, P3 etc etc.
View 2 Replies View Related