AutoCAD Visual LISP / AutoLISP :: Divide Big Region On Lines Intersections
Oct 2, 2013
I need a easy way to create a lot of small regions, or divide a big region in lines intersections, or a fast way to pick points inside objects.
Its like that:
imagine that you do 100 horizontal lines and then 100 vertical lines. Now you have 10.000 squares. i need a fast way to make a region in each one of then.
So its too much trouble to pick points inside each one of then. i need to divide a big region or a fast way to create Plines or objects with the little squares. And i cant use array because they aren t regular squares.
Its something that i do often, its not a one time thing. This is necessary in structure analysis modeling, i export this dwg to a dxf file, that i use on a finite element program.
I need to divide a big region on lines intersections. imagine that you create a region around a chess table and break the region so you get each square as a new region.
I can't use array because the sub-regions aren't regular. I need this divided regions to export a DXF file to a Finite elements program.
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.
I have to put some trusts between two beam. It sounds easy but i'm unable to handle the divide and round off commands in the lisp. See attachement also.
To draw my trust between the 2 beams, what I normally do, is that I manually take the distance between the two points say it's 10 000 and wrote it down. Then I divide it by my max gap, say 1200, it is the max space between trust.
10 000/1200 = 8.333333 that's the result of how much trust and space between them that i'll need, 8 trusts, 9 spaces between the 2 beams. (That is what I'm unable to do in the lisp, tell it to round off 8.333 to 9 and use 9 for divide command)
What I manually do at this point to draw these trust is that I must create a temporarly line between the 2 beams, perpendicularly to these and divide it by 9.
It gives me 8 cross (or point) to draw my trusts. All this is long to do manually because I have many bay in building and I have to redo this operation for every the bay.
So, what I would like the lisp to ask is:
Specify distance between two beams (Between where and where) :
Specify the lenght of the trust :
Specify max gap: I would like to answer a number here, say like 1200 max
(The lisp should draw the lines on the current layer, color and linetype of the current layer and not draw a line at the beginning and at the end because that's where my Beams are. I hoped you understand, see attachement.
Should also have something that handle a ESCAPE hit or cancel, something like this:
I have little Autolisp experience, what I need is a lisp routine that will divide a 3D Poly line to say about 1000 points and add index to the points from the start of the line to the end of the line. It is very important that the index be from the start to the end of the line, because we extract the info to excel and then use the x,y and z co-ordinate of the points on our hydraulic analysis program. We need to have the index and the x, y and z co-ordinates on our Excel sheet sorted by index and not by x, y and z.
To be more clear the 3D poly is a pipeline profile so we need to have the points in order by index and not by x, y and z.
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 need a function that will allow me to do a "divide" with blocks but I need the single attribute to remain intact.
I need the blocks to align with object and keep the attribute. I did get it to work with constants but the function that I need to run next failed because of the constant. My variable is preset and locked.
I want to take a Radio Column with 10 Items and make two columns of 5 Items, so that onlu one of the ten radio buttons are selected. This is aide in spacing on the Dialog Box. I am trying not to re-write the whole program, just add a few options.
I tried to add another Radio_column, it seperates it, but its two separate sections.
With all of you fine teachers, I have the know-how to get the start and end values of a line.
Do you think there is a way to get a point returned that represents the true intersection of the two lines, without having to involke a user defined "getpoint" function using "intersect" osnap?
I am trying to draw a line between two lines and I put together the following. It works great if the start/end points are perpendicular to each other. How do I solve if line one start point is in a positive direction and line two is in a negative direction?
(defun c:test () (setq L1 (car (entsel " Select the first line: ")) L2 (car (entsel " Select the second line: ")) )
i know DIMANGULAR command will let me draw a dimension to display the angle between two lines, but is there a way for my commandbar to show me what the angle is rather than draw a dimension?
I often want to simply know the angle but not display it in the drawing, and it'd be good if there was a command/lisp which showed me in the command line area, or perhaps a pop up window, similar to what the TLEN lisp does here: URL....
I want to get the minimum and maximum x, y coordinate values of selected lines. In other words, i want to find the top, bottom, left and right edges of a set of lines.
I got the attached lisp file from the web which automatically labels the lines with their length. Resulting the values of the length in the absolute values of the length instead of saying that the length is in inch. i.e, i need to remove the inch sign (") from the suffix of the length.
The PARTS LISTS on our old drawings are simply text entities and lines. Some are MTEXT. But our new drawing template has us creating our parts list using the actual AutoCAD TABLES entity.
I'm looking for the best method to go from lines and text in AutoCAD, to an AutoCAD table. As of now, I have to retype everything since I can't select a column/row or group of text entities, copy/paste into a table.
Any LISP function that will allow me to go from TEXT and LINES to a TABLE? I've tried B2E (lisp name) but it's not working - found that on a lisp site somewhere.
how to use AutoLISP to draw lines between two points. I have x,y,z coordinates for the end points in an excel sheet which I can save as a text file. I need to pull the coordinates from the file and use them to draw the lines. There are 2000+ lines so it is not feasible to draw them manually.
I am testing 2010 lisp routines in 2013. One thing I noticed is princ lines are not showing up on the command line until after the lisp routine has finished. Is there a setvar that controls this behaviour?
LISP routine for rotating lines so that text in linetypes always reads from left to right?
I use the QUERY command to create basemaps and often the lines that are imported read upside down or backwards or however you prefer to look at it. Most often, if I look at the XY coords of these backwards lines, the End X coordinate is of a higher value than the Start X coordinate.
Looking for something that would compare the two X coordinates of a line, do some sort of an IF Start X > End X, and if its true, store the XYZ coords of the Start and End in some variable, and swap them.
I have about 30 profiles with water pipe lines that I need to measure all their vertical angles. since the vetical scale is exaggerated so I can't use the acad angular icon tool bar. Only thing I cant think of is to block each run then import them back in at 1/10 in y direction. How to get this done faster or more direct by any other methods.
I want to make many object cooper lines in autocad and each line has some data about its length, size, type etc. that can then extract to excel as a Bill of materials.
I want to draw a line which shows a particular color scheme, I at current do this by drawing a solid line of one color and then use a dashed line of another color top go over it.
The obvious problem is that these lines are being double drawn. Is there a way using lisp that I can draw both lines at once?