AutoCAD Visual LISP / AutoLISP :: Put Point At Each End Of Arc?
Dec 19, 2011
What is the magic word for put a point at each end of an arc, the lisp I have only put a point at center of the arc.
(defun cAA ( / i j ss e1 e2 p1 p2 p3 points )
(if (setq i -1 ss (ssget '((0 . "ARC"))))
(progn
[Code].....
View 5 Replies
ADVERTISEMENT
Oct 9, 2013
I'm trying to find acceptable point values to feed to the vlax-3d-point function for a vla-addmtext function. With vanilla lisp I just provide the point as x y = "7/32" "2-3/8". So I assumed that I could drop a 0 in for the z like: (VLAX-3D-POINT "7/32" "2-3/8" 0).
Then I thought I was going to be tricksy and try (vlax-3D-point (getpoint)) believing that I could pick the point and get what I need to feed the function, but yet again, no deal. The command line gave me:
node
of #<variant 8197 ...>
Nothing I can use in my code. So how do I find the point in a format that vlax-3d-point will like?
View 9 Replies
View Related
Jan 4, 2012
Find attached 2 files , a DWG and a LISP
The dwg show a LWpoly, and 3d-poly.
I try to get the param at the closest point, from each vertex at the LW, at the 3d-poly
But as you will see, for some closests point at the 3d-poly there, is no Param
Check at
par+pt@3dpline-list
Here is a short sample
(0.0 598154.0 6.10764e+006 550.0)
(nil 596287.0 6.10656e+006 674.264)
(nil 594548.0 6.10568e+006 624.456)
(nil 594323.0 6.10534e+006 643.747)
(nil 595273.0 6.10224e+006 633.231)
(74.136 595246.0 6.1014e+006 590.0)
View 9 Replies
View Related
May 19, 2012
know a lisp routine that would insert a block @ a specific point on an arc? For instance if I have an arc that has a radius of 20'-0" & I want to insert a block at a set distance from the end of the arc.i could probably use the divide or measure command but I was hoping I could do it with lisp. I would also like to be able to move the object along the path of the arc at a specific distance.
View 6 Replies
View Related
Sep 18, 2000
I would like a lisp routine that can extract and export the x, y, z coordinates of all the points in a drawing into a text file so I can use the same in excel.
View 9 Replies
View Related
Apr 19, 2012
I have a small app to create, related to point clouds.
I know VisualLISP pretty well, definitely well enough to accomplish the task.but...I can't figure out how to retrieve information on the point cloud's clipbox using lisp.
I know a little VB.NET; I took a one-semester class at the JC, two years ago. It's going to take time for me to get ramped up enough with VB to do this job, so I don't really want you to tell me the only way to get to the clipbox is through vb.
way to retrieve and modify a point cloud's clipbox with VisualLISP?
View 3 Replies
View Related
Sep 18, 2013
I need a lisp that creates a polygon of N points, so to enter a only the distance between these points, after choosing N points in the drawing for approximately creating polygons.
View 7 Replies
View Related
Apr 19, 2013
I need a routine that inserts a point at the insert point or block named "Insert_Point" at every block in the file. The routine could use the current layer, which would be set prior to starting the routine. If it could request the user for the PDMode value and PDSize that would be great too. This will assist me in creating block libraries.
View 9 Replies
View Related
Sep 2, 2013
how can you get the last point you picked on a Circle because I was going to run the TTR and use the tanget command and have it exit and I need to get the point I pick on the circle
View 7 Replies
View Related
Jan 3, 2012
how to extract value X Y Z of point p3 p4
(defun c:test ()
(vl-load-com)
(setq actdoc (vla-get-ActiveDocument (vlax-get-acad-object)))
(setq objm (vla-get-ModelSpace actdoc))
(setq obju (vla-get-Utility actdoc))
(setq oldhigh (getvar "Highlight") oldsnap (getvar "Osmode") oldblip (getvar "BlipMode") oldecho (getvar "Cmdecho") );setq
(setvar "Highlight" 0) (setvar "Osmode" 517) (setvar "Cmdecho" 0) (setvar "Blipmode" 0)
[code]....
View 4 Replies
View Related
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
Jan 10, 2008
How do I change the insertion point of a text using "vla-put" ? I've tried using :
(vla-put-InsertionPoint en a)) with a = (4455.94 428.576 0.0)
and I get the following error:
lisp value has no coercion to VARIANT with this type: (4455.94 428.576 0.0)
View 9 Replies
View Related
Jan 29, 2013
I was trying to add a point as extended data to a block.
Therefor i used this data but i get an error every time:
(setq lastent (entget (CAR (entsel))))(regapp "list")(setq exdata '((-3("list" (1011 . 3277.82) (1021 . 5782.5) (1031 . 369.5) ) ) ))(setq newent (append lastent exdata))(entmod newent)
View 3 Replies
View Related
Jan 31, 2013
I'm wondering if there is a lisp possible to measure area's by pick point (as in bpoly). This little feature exists in Microstation so i was looking for something similar.
Is it also possible if this lisp can measure areas from an external reference (dwg, dxf, dgn, shp etc..)? I'm kind of new to AutoCAD in that sence.
View 2 Replies
View Related
Jan 27, 2012
How can I find a block with a specific name and get what the coordinates are? What we have is our Bill of Material is attributed blocks. I am attempting to change the first one. Well all of the lines that list the parts are seperate blocks with the same name. Now the Top Line of the Bill of Material is a different named block. If I can find the coordinates of this block I can then select the first line to do what I need to.
If needed: AutoCAD 2013 User using Visual LISP for editing LISP and DCL files Also I have AutoCAD 2011 currently still available for us, but we are using AutoCAD 2013 for 99.9% of AutoCAD use
View 3 Replies
View Related
Jun 28, 2013
I continue learning....
(setq ins (vlax-ename->vla-object ( ssname sele cod)) nombre (vla-get-name ins) ) (setq bloque1 (vla-item (vla-get-Blocks (vla-get-Document ins) ) nombre ) ) (setq s_ent1 (vla-item bloque1 1)) (setq pt1 (vla-get-startpoint s_ent1 ))(setq pt2 (vla-get-endpoint s_ent11 ))(setq s_ent2 (vla-item bloque1 2)) (setq pt3 (vla-get-startpoint s_ent2 ))(setq pt4 (vla-get-endpoint s_ent2 ))(command "_pline" pt1 pt2 pt3 pt4 "c")
Why dont draw de _pline?
View 4 Replies
View Related
Jan 17, 2012
create addLightWeightPolyline with 4 points above:
; pktaSpocznik01Lg pktaSpocznik01Ld pktaSpocznik01Pg pktaSpocznik01Pd
(defun dtr (x) (* pi (/ x 180.0))) ;define degrees to radians function
(setq dokladnosc 3) (setq odScianaVerg 200) (setq odScianaVerd 150)
(setq odHtextOr01 2.5) (setq odHtextOr02 3.5) (setq odHtextOr03 5)
(setq odWmPrzekroj01 500) (setq odWmPrzekroj02 700) (setq odWmPrzekroj03 1000)
(setq OdwrOverallScale 0.1) (setq odWmExLine01t 50)
(setq odSciana01gr 250) (setq odSciana02gr 250)
[code]...
View 6 Replies
View Related
Nov 7, 2011
I'm creating the following macro:- (defun C:BK () (command "_BREAK" PAUSE "_F" PAUSE "@" )(princ)) to add to a shortcut key lisp file and then I want it to repeat... How do I make it repeat?
I want it to do the same as this:- *^C^C_break \_f @ but as a shortcut key in a lisp format.
View 7 Replies
View Related
Jan 29, 2003
Using Lisp or VLisp, how can I find the Start & End Point of an AEC_WALL ent. ?
View 5 Replies
View Related
Jul 25, 2012
The good news is that, if I were righting a routine that locks up AutoCAD, I'm finished. The bad news is that I'm not.
The code below is the portion of a routine where I have the user select 2 points and then pass those points to the Zoom command and the M2P osnap. The problem is that, when the Mid Between 2 Points osnap tries to use the first point, it returnns an "Invalid point" message, enters a loop and locks ACAD.
(defun C:ZC ()
(setq PointOne (getpoint "First point of M2P "))
(setq PointTwo (getpoint "Second point of M2P "))
[Code].....
View 2 Replies
View Related
Sep 15, 2011
I need to let the user pick on an entity to get an elevation.
I was using getpoint, with osmode set to nearest, but it allows them to pick 2d items under the 3d items I want picked.
Without doing fancy laer manipulation to turn off 2d stuff, are there any tricks to avoid snapping on the 2d item?
I am thinking I might do an entselp, then try again at same point until i get a 3d one (non 0.0 z coord).
[URL]
View 7 Replies
View Related
Oct 1, 2013
I am trying to use autolisp to change the point label style in autolisp. Mostly teach you how to do it manually, I not sure there is a way to do it in autolisp.
View 5 Replies
View Related
Nov 29, 2012
Is it possible to include a point entity (rather than a zero-length line as in the standard SQDOTS pattern) in a custom hatch pattern?
If so what's the exact format of the line in the .pat file that defines the point?
View 9 Replies
View Related
Feb 6, 2011
I have insert blocks in my dwg. It is the circle. While creating the block, i was just pick the point into the circle not exactly at the centre.
Now i want change the insertion point of the block at centre of the circle without moving the objects from the dwg.
Beacuse i had use block editor to change the insertion point. But after changing, all blocks were moved from the original position.
View 4 Replies
View Related
Feb 13, 2013
I would like to create a lisp that places a block at a pre-calculated point. I've created a lisp that fetches me a block to place into my drawing. The only thing is
I have to point out the place i want it to go. I want it to got into the corner by it self. I would like to create a lisp that calculates, by the retrieved variable of the layout / paperspace, minus 10
from the bottom right corner. minus 10 from the bottom up and from the right edge to the left.
View 9 Replies
View Related
Oct 21, 2013
My multileader style uses a block as a content. How can I find world coordinates of insertion point of block entity within multileaders?
View 3 Replies
View Related
Sep 26, 2012
trying to insert point instead of block.
(setq blok (entget (car (entsel))))
(setq point (cdr (assoc 10 blok)))
(setq XX (rtos (car point) 2 20)) ;; x koordinata bloka
(setq YY (rtos (cadr point) 2 20)) ;; y koordinata bloka
(setq ZZ (rtos (caddr point) 2 20)) ;; z koordinata bloka
(command "point" xx,yy,zz) is not working
!xx="5582453.414999999" but when i (atoi xx) i get 5582453 no dedimals...
how to create valid insertation point from xx, yy and zz?
View 6 Replies
View Related
Sep 2, 2013
We have several AutoCAD drawings with hundreds of block references inserted with imprecise coordinates. Now we need to dimension all elements and need to correct these positions.
I am searching for a routine to round these positions up or down towards a 5mm precision so I don't have to manually move every single block element.
Is there any way to automate the task or do you know any workaround (like inserting the elements into a drawing with poorer unit precision settings)?
View 3 Replies
View Related
Jun 5, 2013
why do not draw the line between ptm1 and pt3?
(defun c:PUNTOM (/ pt1 pt2 pt3) (setq pt1 (getpoint "
Initial point : ")) (setq pt2 (getpoint "
Final point : ")) (setq pt3 (getpoint "
Offset : "))(setq ptm1 (mid (pt1 pt2))) (command "_line" pt1 pt2 "")(command "_line" ptm1 pt3) (princ));;;;;;;(defun mid (p1 p2) (list (/ (+ (car p1) (car p2)) 2.0) (/ (+ (cadr p1) (cadr p2)) 2.0) ));;;;;;;;
View 9 Replies
View Related
Oct 11, 2011
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?
View 3 Replies
View Related
Feb 15, 2012
I have a lisp routing that the user has to use, to create a ucs, that is exactly on the front of the entity the user selects, so that whne they are drafting, labeling, dimensioningn the 3D entity, none of the drating lines are hidden when plotted.
The code is as follows:
(setq obj (vlax-ename->vla-object ent))
(vla-getboundingbox obj 'LowerCorner 'UpperCorner)
(setq LowerC (vlax-safearray->list LowerCorner))
(setq UpperC (vlax-safearray->list UpperCorner))
[code]...
Then I do a condition to see which points are greater than others, and move the ucs depending on the view to the foremost point. The program works perfectly.... however, often, they forget to use it.
I was wondering if I could incorporate it in another lisp that everyone uses, but not having the user pick the entity they want to be in front of (sometimes they pick the wrong entity). Instead, take the group of entities (anywhere between 1 to 30 per drawing (these are piping spools, so the entity count is not that great in model space)) and set a front working plane in model space. Working in paperspace is not an option, we're just too deep into our templates and processes.
I know there is a vmin and vmax, but they are for the X and Y axis, a VMax along the Z-axis would be great.
View 5 Replies
View Related