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


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 :: 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 :: 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 :: Block Insertion Routine Based On Block File Name

Apr 5, 2013

Create a routine that looks for a block based on a portion of that block name, using a specified path or search path. 

For example, block to search for is BLOCKABC123, so if someone inputs ABC or 123 as a block name, it will locate that block within that folder and inserts it into the drawing at a user specified location.

Ideally, if there is a check in that if it finds more than one match, then perhaps it flags or prompts you to choose 1, 2, or 3 option which block to use.  But I can live without this special function if it requires too much time to code.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Modify Insertion Point Of Text

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

AutoCAD Visual LISP / AutoLISP :: Using Insertion Point To Select Line Rather Than Using Entsel

Aug 12, 2013

We have been modifying a trim-around-block routine to have as few clicks as possible and though it feels like we'd be able to have the line to be broken auto-selected based off of the insertionpoint that was set as a variable.

;(setq pnt1 (getvar "lastpoint")
;      sst1 (osnap pnt1 "nea")
;end setq

;(setq ss (ssget '((0 . "LWPOLYLINE")))) ; limited to Polylines
; (while (> (sslength ss) 0) ; as long as there's anything in [or remaining in] the selection set))
; (setq ent (ssname ss 0)
; paramcount 1
; ) ; first entity in [or remaining in] the selection set paramcount 1); end setq
 
are about the closest snippets of code that we've managed to find but neither of these are working.

How we can force the program to break the line without the user having to select the line (because they will have already selected the insertpoint, and using osnap nearest would find the line that requires breaking)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Send Field Value To Multileader With A Block

Dec 10, 2013

I'm trying to send field value to a multileader with a block. I tried:

(VL-CMDF "_.mleader" (getpoint "
Specify leader arrowhead location: ") pause "%<AcVar.17.0 Lisp.*granitelbl* f "%tc1">%")

Maybe it was a naive of me to charge in so boldly. The field appears to have made it in but it does not act like a field and does not reflect the correct value or update. In fact I get no response at all. In fact using "update field" "all" selects the fields but reports that they are locked.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: FAILSAFE Basic Block Insertion?

May 20, 2013

I need a function that accepts a block name as an argument and will insert the named block without fail no matter if the block was made to scale uniformly or not.

How can I determine if the block should be inserted like:

(command "-INSERT" blkn "0,0" 1 0)

or:

(command "-INSERT" blkn "0,0" 1 1 0)

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Block Layer After Insertion

Mar 7, 2013

wondering if is possible to have a lisp routine to:After use the INSERT command, the routine will automatically change the layer of the inserted block to a specific layer according of its name.

i.e.

Step 1 : I will insert a block named Block A using the normal autocad INSERT command (I do not want to insert the block without the Insert window dialog box)

Step 2 : After the insertion, the routine will select the last insertion (or the last object, or any other best way to select this block and will take it's name)

Step 3 : The routine has a list that says:

(If the last insertion (or object) is named Block A, put it in the layer Layer A with color Bylayer and linetype Bylayer)             

(If the last insertion (or object) is named Block B, put it in the layer Layer B with color Bylayer and linetype Bylayer)

and so on... I can make the approprieated list by myself folowing my standards.

I think it will be nice to avoid an error if the block is not in the list. So:

(If the last insertion (or object) name is not in the list, do nothing)

To finish, it will be nice to create the layer if it does not exist. Also, Unlock, Thaw and Turn on the layer if it's Locked, Frozen or Off.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Zoom Layout (Entities Or Insertion Point Extents)

Oct 12, 2012

I have a drawing with various layouts that when I do a Zoom Extents the drawings is reduced to the size of a point.

I have done all the usual, ie: look for extra entities that are "out in space" so to speak and there are none.

I wonder if I have a block or image which may have an insertion point "out in space" and if this may be the issue.

Is there some way to Select all entities or Blocks (insertion point) that may exist outside a particular area ie: drawing limits.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Editing Multi Leader Text Insertion Point

Nov 16, 2012

Is there a way to modify the text insertion point of multileaders using lisp? We have a problem with some of our multileaders getting a landing distance set to a negative value.  My lisp routine will correct these to a default value, but then the text jumps a bit.  If I could get the insertion point prior to changing the landing distance then I could restore that point after changing the landing distance.
 
;;-------------------------------------------------------------------------------------------------(defun c:zld (/ e th dogleg doglegllength sf ss c mlss mlcount) (setqss (ssget (ssget "X" (list (cons 0 "MULTILEADER"))))DWATxtHgt (getvar "userr1")sf 1dogleg (/ 3 32.0)th (if dwatxthgt dwatxthgt dogleg)c 0mlcount 0mlss (ssadd)) (IF ss (while (< c (sslength ss)) (setq e (vlax-ename->vla-object (ssname ss c)) c (1+ c) ) (= (vla-get-ObjectName e) "AcDbMLeader") (progn;;change the dogleglength if

[code].......

View 7 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 :: 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 :: 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 :: 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 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 :: Multileader Scale Variable

Oct 10, 2008

A2008. Is there a setvar, setenv, registry entry etc. that can be used to change the scale of Multileaders with annotative off to have the same effect that DIMSCALE has on Q leaders? I want to have a single scale-independent Multileader style and modify it on the fly along with DIMSCALE and LTSCALE. I'd use Qleader but UCS's do odd things to text position and orientation.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multileader Attribute Layer

Oct 22, 2013

I created a block with attributes on various layers to make it possible to turn them on/off by need. The I created a multileader style and set this block as a content. When I create a multileader all attributes appear on the same layer as the multileader itself (text entities in the block keep their layer). Is it possible to manage attribute's layer in multileader?

Please see the attached file.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Converting MText To Multileader

Nov 19, 2013

I got this nice little lisp from [URL] .....
 
(defun c:mt2ml ( / oobj nobj nstrg) (vl-load-com) (setq oobj (vlax-ename->vla-object (car (nentsel "
Select source text: ")))) (if (= (vlax-get-property oobj 'ObjectName) "AcDbMText") (setq nstrg (vlax-get-property oobj 'TextString)) (exit) ) (command "_MLEADER") (while (= 1 (logand (getvar "CMDACTIVE") 1)) (command PAUSE)) (setq nobj (vlax-ename->vla-object (entlast))) (if (= (vlax-get-property nobj 'ObjectName) "AcDbMLeader") (vlax-put-property nobj 'TextString nstrg) (exit) ) (entdel (vlax-vla-object->ename oobj)) (princ))

It converts MText to a Multileader.

My goals would be as follows:
 
The multileader should end up on the same layer as the Mtext.  (Currently it uses the current layer.)The multileader should hold the same rotation as the Mtext. (Currently it goes to zero.)The multileader should be created in the same location as the Mtext, without the user having to click.  (Currently the multileader is created wherever the user clicks.)The multileader should be created without a leader.  We can add one afterwards if needed, but for many we don't need a leader.  (We're just using the object as mtext with a box around it.)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Basepoint During Insertion Of Blocks

Jan 14, 2013

would like to set a base point during insertion of one block.When not insert by AutoLISP, just type "b" to be able to change the base point.

But when I'm using an AutoLISP that inserts a block, it does not work, it interrupts the sequence of routine.

Lisp:
 
(defun c:carrobox()(setq #clayer (getvar "clayer")) (if (= unidades nil)(setq unidades "cm")).....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Using Entmod To Rotate Text In Multileader

Jun 10, 2010

I would like to use the entmod method to rotate the text in a Multileader object. Reading the DXF code tells me the dotted pair of 42 seems to be the rotation angle, but entmoding that does nothing. Obviously I don't know how to modify this complex object.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find And Replace Multileader Text

Jan 25, 2012

I'm looking for a lisp routine that can find and replace multileader text.

I want to replace "T." with "T+" and "B." with "B+".

All the multileaders are on layers with a suffix of "-elev".

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Removing Nested Block From Main Block?

Oct 3, 2013

I get an AutoCAD drawing from my conveyor manufacturer who have buried a block (tagname) in all of their conveyor blocks.

The only way to remove them is to manually use BEDIT and erase the tagname block.

Is there a way through Autolisp to search all blocks in a drawings and if the tagname block is part of the definition of the conveyor block, erase the tagname block or redefine the conveyor block without the tagname block.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Retrieving Block Name Of Anonymous Block

Mar 8, 2013

When dynamic blocks are inserted they're assigned an anonymous block name.  I'd like to be able to retrieve the name of the parent block after selecting the block on screen using AutoLisp.

Need a bit of code that handles this?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Match Multiple Attribute Values From One Block To Another Block

Feb 12, 2012

I need to match few attribute values from one block to different block. I download a lisp file called; ca.lsp which can match the single attribute value. I modified it for more than one attribute value matching. It is ok but still wish to overcome two issues for batch prcess

1. picking up the blocks by selection

2. click the alternative block numbers of times to match the numbers of attribute values I needed.

How to modify this lisp I can run it by block name selections instead of picking selection which enable me to run batch process for numbers of drawing? That will be good...

Lisp & Demo file attached (Match attribute value, A, B & C to Attribute 1, 2 & 3).

View 3 Replies View Related







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