AutoCAD Visual LISP / AutoLISP :: Surface Angle With 4 Points

Nov 6, 2013

I need very very often to know the angle between two surfaces to write cnc programms...At the moment i draw allways two lines normal to the line between the two surfaces an use then the angle measuring tool.Works good, faster then bks and dimensioning, but need also time and always need to delete the lines after...

Is it possible to get a lisp which ask für 1 point on the first surface, 1 point on the other surface and two points on the line between the 2 surfaces? So the lisp know 3 points of each surface and can give out the angle between... Should be allways between 0-180°

So it needs only 4 klicks to get a angle! That would be so great! Is there a lisp programmer who can make this possible?

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Connect Two Points With Given Elevation Following Surface File / Entities

Dec 4, 2013

I am working on a flood inundation, I would like to find a lisp or command(i'm not finding) to connect two points with a given elevation following the surface file or surface entities. 

here is a small section as example right now it's just guesswork, some of these have taken a week to connect all the sections.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Angle From X / Y Plane

Jun 1, 2012

So I've done a lot of searching this morning on "angles", and I couldn't find anything for getting the "out-of-plane" angle.

I'd like the user to pick two points, and return somehow the angle out of plane.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Transform Angle

Apr 12, 2013

how to transform the angle (unit direction) of nested  XLINE / RAY (at any deep level) from MCS to WCS recently i have download the following  functions (by gile & Vladimir Nesterovsky) whem i call (MXV) with matrix [returned from nentselp)] and unit direction of nested XLINE it returns nil

;; MXV
;; Applies a transformation matrix to a vector  -Vladimir Nesterovsky-
;;
;; Arguments : une matrice et un vecteur
;; return : a vector
[code]....

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Available For Angle Between Two Lines?

Nov 28, 2011

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....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Calculate Angle Between Two Lines

Apr 10, 2002

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.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Angle Of Polyline Segment At Specified Point

Mar 19, 2013

I am writing a routine that will place a piece of text at a specified point along a polyline. My problem is to determine the angle for the text. It needs to be the same as the segment of the polyline that it falls on. Just can't get my head around how to get that angle?

I can get a list of the vertex point of the polyline, but how do I determine the segment the point falls on?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Polyline Deflection TYPE Angle Table

Jul 19, 2013

The attached image shows a table that I created as a AEC Object from my Civil 3D Alignment (i can turn it to 'MText' and then 'Text' in one or two steps). What I need is a routine, or anything, that fills the third column with an information based on the second column: the deflection angle, something like that:

Curve       Angle         Type of angle

  C1       22°30'00''               2

  C2       39°21'28''               3

  C3       44°59'59''               3

  C4       45°00'00''               4

  C5       45°00'01''               5

Is there something I could read to study to solve it myself and specify my own angles/types of angles?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Z Value For Points?

Jan 5, 2012

I have a drawing that has 2D pipeline (only x and y, z value =0) and 3 topo contour lines ( with x, y and z vaules). I need to divide the the 2D pipeline into say 2000 points and then get the corresponding z values from the topo contour lines. I think it can be done by interpolating between the z values for the two apparent intersection points of the 2D line and the contour lines, the x and y values will be the same for the points that falls between these two aparent intersections. Is there any lisp out there that can do that.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Circles At Line End Points?

Feb 2, 2012

I need to place a circle, of a user-defined radius, as a marker at the endpoints of all lines in a drawing.  how to accomplish this using lisp?  It doesn't matter if they overlap; I can use OVERKILL to delete those objects.

I started the code with:

(defun c:cmark ()
(setq crad (getdist "
Specify radius: "))
)

But don't know how to cycle through the objects, determine the end points of lines only.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Corresponding Z Value For Say About 2000 Points On Pipeline

Dec 19, 2011

What I have is a topo plan in 3D (All contour lines have x, y and z values). My pipeline is on x and y coordinate only. I need to get the corresponding z value for say about 2000 points on the pipeline.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Use It For Drawing Lines Between Two Points

Aug 19, 2013

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.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Dimension Between Two Points In A Selection Set

Nov 1, 2011

Looking to make a selection set of points that are on a specific layer, and then create a dimension between, in this case, two points. I feel like it should be very simple, but I can't get it to work for the life of me. Here is the test code I've been playing around with:

(defun c:test (/ sel1 TC)
(setq sel1 (ssget "X" '((8 . "VPOINTS"))))
(setq TC (polar (entget (assoc 10 (ssname sel1 0))) (dtr 180.0) 9))
(command "DIMLINEAR" (entget (assoc 10 (ssname sel1 0))) (entget (assoc 10 (ssname sel1 1))) "V" (polar TC (dtr 180.0) 9) "")
[code].......

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Finding 2 Points Along A Pline

Jul 7, 2013

I have plines of circuits that sometimes have T's (line goes along, then T's out then back to T point and then continues).

Here is example line -

(setq List_Pline (list (list 0 0) (list 1 1) (list 0.5 1.5) (list 1 1) (list 2 2) (list 3 3) (list 3.5 2.5) (list 3 3) (list 4 4)))

nth 0 = (0 0)
nth 1 = (1 1)     - T point
nth 2 = (0.5 1.5)
nth 3 = (1 1)     - T return point
nth 4 = (2 2)
nth 5 = (3 3)     - T point
nth 6 = (3.5 2.5)
nth 7 = (3 3)     - T return point
nth 8 = (4 4)

I need to be able to pick 2 points along the line and find the shortest route.

Examples - 

1st point at 1,1 and 2nd point at 3,3 - new line is nth's 3,4,5

1st point at 0,0 and 2nd point at 1,1 - new line is nth's 0,1

1st point at 2,2 and 2nd point at 3,3 - new line is nth's 4,5

1st point at 3,3 and 2nd point at 4,4 - new line is nth's 7,8

1st point at 0,0 and 2nd point at 3,3 - new line is nth's 0,1,2,3,4,5

1st point is 1,1 and 2nd point is 1,1 - new line is nth's 1,2,3

I've tried using vlax-curve-getParamAtPoint, but it returns 1st T point.

Synopsis of program -

Select Pline

Pick 1st point

check if on line

Pick 2nd point

check if on line

check if 2nd point is before 1st point, if so swap locations

find last nth of 1st point

find 1st nth of 2nd point

return list

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get End Points Of Invisible Line?

Aug 23, 2013

I am trying to get the end points of an invisible line it would be the line that you offset I know all about polar I just don't know which angle to add or subtract and I will pick the point on the side I want it to be on I am going to pick 2 lines and I want them to offset invisible lines in the middle the lines are not parallel.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Tangent Line And Pass Through Two Points

Aug 20, 2012

We have a need to select a tangent line/polyline etc and then select two other points we would then like to have the program draw an arc through the two points and yet still be tangent to the initial line/polyline that we picked.  We don't care what the radius is as we believe there is only one solution anyway.  It would be wonderful if we could just use the Arc command and select start>Second Point> then just use the Tangent Osnap but I guess that is out of the question :-)

The only code that I have come across that even resembles this only allows for one point not two (STILL VERY HANDY AND VERY SLICK)

(vl-load-com)
(defun near_vertex_arr (obj / dxf_obj e_next obj_vlax pt_sel par pt_first pt_snd i bulge)
;bruno.valsecchi

[Code]....

How does everyone else hande this?  By they way... I dont care what language it is written in :-)

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Incrementing Pick Points Alphabetically

Aug 8, 2013

I know how to increment pick points numerically (see below). How is it done alphabetically?
 
(defun C:test (/ pt# pt) (setq pt# (getint "
Enter number: ")) (while (setq pt (getpoint "
Specify point: " ))(if (/= pt nil) (progn (command "TEXT" "M" pt "" "" pt#) (setq pt# (1+ pt#)) ) ) ) (princ))

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Missing OSnap Points With PDF Files

Mar 12, 2013

I am using autocad 2013 and importing PDFs into the drawing and recently the OSnap points within the pdf are missing. The PDFs are of floorplans and I was able to measure from wall to wall using endpoints and midpoints. Now I am only able to select the endpoints on the frame of the pdf.

Is there a switch that might have been turned off?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Remove Duplicate Points From A List?

Aug 5, 2013

I am looking for code to remove duplicate points (xy coords) from a list with a fuzz factor parameter.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Make Different Start Points For Different Commands

Jun 29, 2013

My first lisp, so bring it hard on me I want to be an expert in autolisp .

My lisp is meant to do the following:

draw a rectangle with ”0” fillet. It can be done either via rectangle command, or pline command. The attached lisp has the variant with the pline-case.

The, I need to draw inside a smaller rectangle, with a fillet value, that is promoted and indicated by the user. The smaller rectangle must be centered inside the bigger one. I thought it was a good idea, to take one insertion-point for the bigger rectangle.

and to calculate a 2-nd insertion-point for the smaller rectangle, via "polar" function.

What I get:

the 2-nd insertion point is put the same as the 1-st one.

I wish to draw the bigger rectangle with one layer "example: Layer 1", and the smaller rectangle with another layer "example: Layer 2".

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Defining Points For Spline Command

Apr 4, 2012

I am working on a little lisp routine to draw splines, but can't get it working. The basic idea is that i first select a set of points that i can feed to my spline command.
 
(defun c:test2 () (setq pt (getpoint "
define point:")) (setq ptlist nil) (while (not (equal pt nil)) (setq ptlist (cons pt ptlist)) (setq pt (getpoint "
define point:")) ) )

Now i need to draw a spline based on these points. My plan whas to simply use the acad command itself. But this option didn't work.
 
(command "spline" ptlist "")

Then i tried using the vla-addspline command. But i can't even get this one working .

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Distance Between Two Points Along The Path Of Polyline

Sep 10, 2012

There are times that I have a really long curb polyline that has both line and arc segments.  I wish to pick two points along that polyline and have it give me the distance between those two points along the path of the polyline.

Do we have this ability natively?  Have I been missing something all this time?  Normally I have to make a copy of the original entity, ... break, break, list erase or undo....

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Draw Line On List Of Points

Jul 7, 2012

I have a list with many points is it possible that i can draw a line or polyline on those points using MapCar function.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Calculate Points Offset To Pline

Sep 27, 2013

what I am attempting -

Pick a line

Pick a starting point on the line

Pick a ending point on the line

Pick side to offset

create list of offset points

Create a new line with a offset

I think I could do this using brute force, but would prefer a mathematical solution.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Missing Points While Render Script

Nov 2, 2012

I want tp write my first programm with autolisp. I use Autocad 2012(rus). When I run my script I see that some of points are missed in the autocad. Maybe I do something wrong?

 (setq RB 300)(setq RM 70)(setq N 12)(setq M 11)(setq I 0)(setq J 0)(defun alphai (i) (/ (* (/ (* 360 i) N) PI) 180))(defun gammaj (j) (/ (* (/ (* 360 j) M) PI) 180))(defun XIJ (I J) (* (+ (* RM (cos (alphai I))) RB) (cos (gammaj J))))(defun YIJ (I J) (* (+ (* RM (cos (alphai I))) RB) (sin (gammaj J))))(defun zij (I J) (* RM (sin (alphai I))))(setq I 0)(setq J 0)(setq PT0 (list 0 0 0))(setvar "CMDECHO" 0)(repeatM (repeat N (setq PT (list (XIJ I J) (YIJ I J) (ZIJ I J))) (command "_point" PT) (setq I (+ I 1)) (setq PT0 PT) ) (setq I 0) (setq J (+ J 1)))

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Erase All Points In Specific Layer

Apr 9, 2013

I have a lisp which I use to erase all points in a specific layer.

(defun cPL ()
 (setq ss1 (ssget "x" (list '(0 . "point")'(8 . "Points"))))
 (command ".erase" ss1 "")
 (princ)
)

It is working only if I have the points in the DWG. If there are no points, I receive "Unknow command DPL". Is there anything I can do in order to avoid this error?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Convert Lines To Points?

Feb 26, 2012

Just going over some old stormwater flows but have some other stuff included in the coordinates I have, is their anyway to convert lines to points?

I know a long way but im just seeing if theres a quick lisp routine that can do it for me?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Insert Block To Points Taken From Txt File

Jun 28, 2013

I got this code in a web trawl to insert a block to points taken from a txt file......

its coming back with an error as follows:

; === Top statistic:
; Function definition (with number of arguments): ((C:INSERTBLOCKS . 0))
; Check done.

What does this mean and how can I fix it.

(defun c:insertBlocks (/ txtFile xyData expertVar attreqVar)(setq expertVar (getvar "expert"))
(setq attreqVar (getvar "attreq"))
(setvar "expert" 2)(setvar "attreq" 0)
(setq txtFile (open "c:\cad\textfile.txt" "r")) ;

[Code] ......

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Circles And MText Within Specified Points?

Apr 9, 2012

I am not sure why this is not working.

(setq SelectionSet (ssget "C" Point1 Point2 '((-4 . "<or") (0 . "CIRCLE") (0 . "MTEXT") (-4 . "<or"))))

I want to select circles and mtext within the specified points.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide Spaces With Max Gap - Draw Lines Between 2 Points

Feb 6, 2012

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:
 
(defun trap1 (errmsg) (command "_.undo" "_end") ; undo end (setvar "osmode" oldsnap) ; restore variables (setvar "cmdecho" 1) ; enable cmdecho (setq *error* temperr) ; restore old error handler (prompt "

[Code] ....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Combining Random Points Into Lines / Vectors

Jun 7, 2012

I'm working on a program that requires me to analyze a series of 3D coordinates (which describe the start and end points of individual lines) and combine those points that are collinear (there are lots of smaller line segments, some of which are co-linear and overlapping in space) into one single line.

how to analyze these points to find out which ones can be combined. For example, I might have 6 lines, 3 are separate and have their own specific orientation, but 3 are overlapping and in the same direction (look as a single line on the screen). I'd like to modify my point list so that it describes 4 lines... (the 3 individual ones and one which combines the 3 overlapping lines).

View 1 Replies View Related







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