AutoCAD Visual LISP / AutoLISP :: How To Find If Point Inside Polygon / Block's Area

Sep 20, 2011

How would I go about this.  if a two blocks or polygons are overlapping area? 

A good method or the algebraic formula for a function to tell me if a point is inside a polygon or block's area? 

View 5 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Find A Block And Get Its Insertion Point?

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

AutoCAD Visual LISP / AutoLISP :: Polygon From Distance Between Point

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

AutoCAD Visual LISP / AutoLISP :: One Attribute At Two Different Locations Inside Of One Block

Aug 5, 2011

Is there a way (or a “trick”) to have one attribute at two different locations inside of one block (I want to avoid filling in the same text twice when this block is inserted or edited)?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Modify Line Inside A Block

May 20, 2013

I have a simple block with 2 attribute and 1 line inside it.

something like this:

Attribute1

──────

Attribute2

I want to modify length of line due to width of thoes attributs. length of line is equal to maximum(width attribute1 and width attribute2).

dxf code for start point of a line is 10 and end point for a line entity is 11.The question is: how can I modify the length of line automatically via maximum width of these attributes?

for getting width of a text:

(defun GetWidth ( en ) ((lambda ( lst ) (- (caadr lst) (caar lst))) (textbox en)))
sample:

A1
──────                    
Attribute2

Attribute1
──────           
A2

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Redefine Block Inside Reactor

Dec 4, 2012

I have the following code to redefine a block after a command has ended:
 
(vl-load-com);*********************************************************(defun Redefine() (command "_.INSERT" "reactortest=reactortest" nil)(princ "Block redefined."));****************************************(vlr-command-reactor nil '((:vlr-commandEnded . endCommand)));******************************************************(defun endCommand (calling-reactor endcommandInfo / thecommandend) ; Get the name of the command.(setq thecommandend (nth 0 endcommandInfo)); Check name of the command.(cond ((= thecommandend "PLINE") (Redefine)));cond(princ));defun(princ)

It doesn't work because INSERT is an interactive function and can't be called while a reactor is active. Is there another way to redefine a block that can be used in a reactor? The block is in one of the default search path's.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Pick Point And Measure Area

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

AutoCAD Visual LISP / AutoLISP :: Insert Point At List Block And Dynamic Block

Apr 18, 2013

I am learning autolips and i found  a problem that i can´t solved.
 
(vl-load-com)(defun c:pmb ( / ss ent pt )(prompt "
selec block : ")(setq ss (ssget '((0 . "INSERT")))) (setq ent (ssname ss 0)), (setq pt (cdr (assoc 10 (entget ent)))) (command "point" pt))
 wich this code you select one block and insert one point at insert point´s block.

which this other code yo select all block and insert all  point.... but in one block
 
(vl-load-com) (defun c:pmb11 ( / sele cod bloque nbloque lista pt ) (prompt "
block: ") (setq sele (ssget ( List'(0 . "INSERT"))) Cod 0 )cod (1+ cod) (repeat (sslength sele) (setq bloque (ssname sele cod)) (setq pt (cdr (assoc 10 ( entget bloque)))) (command "punto" pt) );repeat ) 

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete All The Dimensions Inside Selected Block?

Dec 2, 2010

I need a lisp routine which will delete all the dimensions inside selected block or blocks, including nested blocks inside.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Text To Attribute Inside Block

May 3, 2013

Looking for routine for converting text to attributes inside the block?

In my drawing I hv some attribute blocks having some Text in it. I need to change the Texts inside the blocks as Attribute Texts. I am attaching sample Blocks drawing..

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find Start And End Point Of AEC WALL

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

AutoCAD Visual LISP / AutoLISP :: How To Find The Fore-most Point Of A Group Of Entities

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

AutoCAD Visual LISP / AutoLISP :: Find Invert Level Of Middle Point Of Arc?

Dec 5, 2011

I need one lisp to get invert levels, I am having Invert levels and cordinates of two points of an arc how can I find invert level of a point middle of tht arc?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Link Attributed Block With Polyline To Get Area

Sep 13, 2013

I'd like to set up a blockwith different attributes like Roomname, Floor, Area,...

Therefore I'd like to link a polyline of the drawing with the block and it shows me its area. I know how it works with fields, but not how to connect it when the field is within a block.

Is there a LISP for that?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Inserting Block On A Point Of Arc?

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

AutoCAD Visual LISP / AutoLISP :: Insert Point At Every Block?

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

AutoCAD Visual LISP / AutoLISP :: Changing Insertion Point Of A Block?

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

AutoCAD Visual LISP / AutoLISP :: Placing A Block At Pre-calculated Point

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

AutoCAD Visual LISP / AutoLISP :: Multileader Block Insertion Point?

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

AutoCAD Visual LISP / AutoLISP :: Rounding Up Block Coordinates (insertion Point)

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

AutoCAD Visual LISP / AutoLISP :: Block Insertion Point Is Within A Closed Polyline

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

AutoCAD Visual LISP / AutoLISP :: Make Block Which Is Visible To Snap Only On Special Point

Dec 27, 2011

I want to make a block which is visible to snap only on a special point, say pivot point.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Block With Pick Point On Line Prompt?

May 8, 2013

I have a lisp routine that I would like to add to. Right now when running the macro the user is not prompted to "Pick Point On Line" in this example

(command "insert" blk "s" var1 pause pause))

I have added the line

(setq pt1 (entsel "Pick Point On Line "))
(command "insert" blk pt1 "s" var1 pause pause))

but the command doesn't seem to like my PT1 value

BLK and VAR1 are set in another lisp routine.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Dynamic Block Based On Previous Selected Point

Apr 9, 2012

For a program i am working for i have to extract the base point of a dynamic block.

This can be done perfectly by this function:

(cdr (assoc 10 (entget (car (entsel)))))

But i want the entity selected based on a previous slected point. So for example when i selected pt1 (which is a point at the border of the dynamic block) i want to be able to extract the base point on the block whit this point.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Point At Block Insert Point

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

AutoCAD Visual LISP / AutoLISP :: Saving Areas Of All Closed Polygon

Mar 4, 2013

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 ?  

View 9 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

AutoCAD Visual LISP / AutoLISP :: Breaking Objects Intersecting With A Polygon And Erasing

Apr 5, 2013

Breaking objects intersecting with a polygon and erasing them with an option outside/inside,

I couldn’t find out a single  lisp file that can

Break all objects intersecting with a particular polylineAnd then erase objects with an option to choose inside/outside objects

Software: AutoCAD 2014, AutoCAD C3D, AutoCAD M3D, Revit
Windows 7 (Ultimate 64 bits),
Firefox 20.0,
Kaspersky 2013.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change 6 Sided Polygon To Circle Around Text

May 29, 2012

I have a window schedule lisp routine that places a 6-sided polygon around text that label each window.  I want to change the code so that its a circle instead of a polygon.  Here is the code line that needs to be modified:

(command "polygon" "6" "fro" (cdr (assoc 10 (entget templine)))(strcat "@38,-" (rtos (+ (* linecount 18) 14) 2 0)) "C" "6")

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Do Lines / Polyline On Line Edges Creating Polygon

Oct 22, 2013

I really need a auto lisp that do lines/polyline on line edges creating a polygon like the example.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Flatten Inside Blocks

Apr 17, 2012

I wanted to flatten arcs, circles and lines inside a block using the following lisp (which I found in this forum). I found that sometimes this lisp is unable to flatten the ARCs inside the blocks. I do not understand why it is not working for all the blocks. I have attached a drawing in which this lisp is not working.

(defun c:FlattenRaj ( / blocks stpt enpt inspt )
(vl-load-com)
(setq blocks
(vla-get-blocks
(vla-get-activedocument
[code].......

View 1 Replies View Related







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