AutoCAD Visual LISP / AutoLISP :: Select Top Block Of Column And Get Bottom Left Bounding Box Corner

Jul 10, 2013

I have blocks forming a column, and I need to allow the user to select the top block of the column but return the bottom left corner of bounding box of the bottom block in the column. 

(DEFUN NXT-INSPNT (/ BLKLST CURENT CUROBJ IDX IPNT MCMD NENT SEL SS VENT) (PROMPT "
>> Pick the Category HEADER to add note:") (SETQss nilss (SSGET ":E:S" (LIST (CONS 0 "INSERT"))) )
(IF ss (PROGN (SETQ sel (ENTGET (SSNAME ss 0)) iPnt (CDR (ASSOC 10 sel)) )
(princ iPNT) (setvar "attreq" 0) (VL-CMDF "-INSERT" "LEG-NOTE" "S" 1 iPnt 0 PAUSE)

[Code] ....

 I'm not exactly sure where my code is failing but I get the following error.

error: AutoCAD.Application: Null extents

View 3 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Bounding Box Of Block Definition

Nov 8, 2011

How i can calculate bounding box of a BLOCK definition ? I know after inserting a block, we can get bounding box of a block reference.

But how can i get bounding box before insert? Assuming that i never going to scale or rotate it.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Move A Named Block Left 5 Inches

May 24, 2012

I'm dabbling in lisp to reduce some drafting time. I'm looking for a way to move a named block left 5 inches. The names block in this instance is "Bricks". What would be the easiest way of writing this in lisp form? I searched through the forums and I couldn't find what I was looking for. This is not after an insert command. This is a block that currently exists in the drawing template.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Unable To Select A Block

Feb 6, 2012

what I'm trying to do is have the program select the block and then I want to get out of it what the Block Name is, so I can then compare it to the list of block names that I want the program to move. Here is what I was trying to use:
 
(setq enlist2 (ssget "_X" (list '(0 . "INSERT") (cons 10 (trans '(0 0 0) 1 0)))))(setq en (entget enlist2))

 However, when I do this, I get this error message: Error: bad argument type: lentityp <Selection set: 1e02>

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 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Using SSGET To Select A Block To Move It

Feb 3, 2012

I'm having an issue with using the SSGET to select a block so I can move it. I'm changing the UCS to be at the center of the top view in the program(user selects center) and the block is at 0,0,0 after changing the UCS. However when I use SSGET it doesn't select it. So I used:

(setq en(car (entsel "
Select a block :")))(setq enlist(entget en))
 
and it lists the DXF Code of 10 as

(10 15.0893 13.5165 0.0)
 
How can I then select it if I don't necessarily know where the block is going to be?

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 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Dynamic Block By Its Name But It Does Not Work?

Sep 23, 2011

i am trying to select a dynamic block by its name but it does not work

(setq WW (ssget "x" (list (cons 2 "WET WELL"))))

View 8 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 :: Text With Bounding Box

Jan 13, 2012

I use the bounding box (vla-getboundingbox) to assess parameters of blocks.  These blocks have text on some of the faces that extends beyond the simple dimensions of the blocks themselves.  I'm wanting to have bounding box ignore the text and can't sort it out.  I've tried putting the text on a separate layer and turning it off and freezing it.  

 I've considered looking at sub entities and filtering out the text but I don't know if there is a solution here or not.  

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Draw Bounding Box At Current UCS

Oct 16, 2013

The first rectangle is drawn from 0,0 at the World Coordinate System. There is never any trouble with the code below when the objects are drawn at the WCS. The problem is when I try to draw a bounding box around an object while in another UCS. It seems that it always draws the bounding box at the WCS instead of my UCS. I have used (trans <pointlist> 0 1) on all combinations it seems and I still cannot get it to draw the bounding box at the current UCS. 

(defun c:GetFromBoundingBox (
/
*ACAD_DOCUMENT*
mspace 
pSelectedObject
lwLeft
upLeft
lwRight
upRight
[code]...

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Bounding Boxes Around Items With Extrusion Vector

Apr 1, 2013

I have 3d items exported from sketchup, that have extrusion vectors to them.the VLA-GETBOUNDINGBOX lisp function seems to return values from the block's coordinate system.

I need values as if there was no extrusion vector, in WCS.I am not clear on how to do this, as it seems like I want a fundamentally different box.Is there a way to recalc the box orthogonal to world coord system for each insert of the block? URL....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Read Second Column From A CSV?

Oct 18, 2012

If I have a CSV file (with no header) that contains three columns and I want to return values of  the second column as a list, how is the best method to do that?

I have seen something where one can separate a string into a list by a divider (in my case, the commas between the three columns) but the actual code for me to inspect was supposed to be in an attached ZIP file which I didn't see as part of the post.

An example of my CSV (as a list) wouild be:

("PO-30-10,PIN OAK,88-15" "PO-30-10,PIN OAK,88-01A" "JS-20-5,JUNIPER,63-04" "PP-40-10,POPLAR,38-22")

and I need the resulting list to be:

("PIN OAK" "PIN OAK" JUNIPER" "POPLAR")

Is there a LISP way to do this - or only VLISP?

View 5 Replies View Related

AutoCad 2D :: Ctrl+V Origin Not At Bottom Left Corner

Dec 17, 2013

Normally, when you select an object or a group of objects and you go to copy it/them with Ctrl+V (NOT Ctrl+Shift+V), AutoCAN'T will use the bottom left extents of the object(s) as the base point for what you are pasting. For whatever reason, when I select+copy+paste an object, the base point/origin/whatever you want to call it, is way off and not even near any of the objects.

How can I reset this?

View 3 Replies View Related

AutoCad :: How To Get 0,0 At Bottom Left Corner Of The Paper In Paperspace

Feb 2, 2009

Trying to draw a titleblock for a college assignment and its supposed to start at 5,5 but that is in the middle of the paper (A3 setup). 0,0 is somewhere in the middle too - how do i get 0,0 to be the bottom left corner of the paper in paperspace??

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Excel Sheet Column

Aug 13, 2013

I'm trying to get an excel sheet to open and count cells based on the text inside a selected column then compare it to cad. The column says "red" or "green" and I want to compare it to a count of red and green hatches in cad.

I managed to get them to be counted in cad but I'm not sure how to get the excel part to work.

Note: I posted an earlier post thinking to count the actually color in the excel cells rather than the words but that ended up being quite complicated.

View 9 Replies View Related

AutoCAD Civil 3D :: Display Elevation At Bottom Left Corner?

Nov 21, 2013

Is there a way for the elevation of surface to be shown in the bottom left corner along with the easting and northing as the cursor tracks over the surface? currently only the easting and northing track with the cursor the elevation remains 0.00

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Modify Table Column Widths

Apr 26, 2012

How to modify the column widths of an ACAD_TABLE?

I have known co-ordinates that I want each grip for the table to be set at.  I can't just copy and paste the table from drawing to drawing.  Each table of each drawing have different textual values, and the column widths will best be sized for each text value.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Importing An Excel Column Into A List?

Sep 6, 2012

I am trying to import a list of customers from column A in an Excel file into a list for a popup_list for my Drawing Properties DCL.  I am having trouble finding information on how to do this.

Basically: Load the file, (workbook through active sheet: vlax-get-property)

(setq xlSheets (vlax-get-property xlBook 'WorkSheets) )

Then, how do I get it to put column A properly into a list for the DCL?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adjust Column Width To Length Of Text

Apr 27, 2012

Several times, we generate a drawing, and the text widths in the columns vary greatly.  Some have text that is ten characters long, and others have thirty-plus characters.

Is there a way to be able to select the table (or perform the command to all tables in the current layout) and have each of the columns expand to the appropriate width, that depends on the longest string of text in that column, for each column.  The problem I see, is that some tables have two columns, some have six, and of course other with any number in between.  The same is also true for the amount of rows.

View 7 Replies View Related

AutoCad :: Text Window - Permanently Docked It In Bottom Left Hand Corner

Jun 9, 2011

I lost the text window that is normally docked on the bottom of the AC screen. I searched and found that F2 brings it up, but I can't find how to have it permanently docked in the bottom left hand corner, where it normally resides. I'm using AutoCad 2002.

View 5 Replies View Related

Photoshop :: Little Grey Icon On Top Of Presets To Bottom Left Corner?

Jun 13, 2012

Yesterday, I went into my presets folder because I was searching for a particular brush, and I noticed a little grey overlay icon with a white line in a 45 degree angle. The little icons sit on top of the presets icons, and they are located to the bottom left hand corner. I tried to search what that means, with no luck. Just in case, I even checked everything with my antivirus, but it doesn't seem to be a virus. What is that? (I'm running Adobe CS6, in a Windows 7 Ultimate, 64 bit pc)

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Possible To Make Left Mouse Click Initiate Zoom Window?

Jan 1, 2012

I still want it to have its normal behavior while in a command, but when not in a command it still enters the selection mode, which does not work, but if it would enter a zoom window command, it might be a more useful command.

View 5 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 :: 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 :: 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

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 :: Insert A Block / Explode And Rename Nested Block With Suffix

Nov 30, 2012

I have a block that i want to insert several times and revised each one to be different to do this i would have to insert it and rename the blocks that come in and then reinsert i would like to insert and have a lisp explode the main block and rename the other 2 blocks with a suffix at the end depending on how many times its in the drawing... can this even be done? My original block name that will be first inserted is "BENT PULLEY NOTES" it needs to explode after i drop it in and then there are 2 blocks within that called "Bent Pulley" and "Bent Pulley DYN" that i was hoping to keep the names but add a number at the end depending on how many are in the drawing already...

here is a lisp that i have found... it would work if i didn't have nested blocks and only wanted the one block to be insert and not explode...

(defun c:Test (/ e i name Bname )
(setq e nil)
(command "_.-insert" "Drawing1.dwg" pause "" "" "")
(if (setq e (entlast))

[Code] .......

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Block To Annotative Block?

Dec 23, 2013

I have a dwg with 40 blocks that have a non-annotative property. I can go through 1 by 1 and change the property to annotative and redefine the block. Is it possible to automate this? I have done some google searches but have not found anything I am able to cut and paste or put together to get it to work.

Civil 3D 2012 SP4.0 Windows 7 Enterprise 64-bit
C3D 2014 SP1
Dell M6600, Core i7 @ 2.3GHz, 16 GB ram
Dell T3500 workstation, too much ram to post

View 3 Replies View Related

CorelDRAW Graphics Suite X6 :: How To Restore Color Eyedropper Tool At The Bottom Left Corner

Jan 8, 2013

how to restore the Color Eyedropper tool at the bottom left corner for some reason it completely disappeared.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select All Viewports (LSP)?

Sep 26, 2013

I have the below code, which works great accept if the layout tab doesn't have a viewport.What am I missing?

(defun ViewportLayerUpdate ()
(setq OLDcmdecho (getvar "cmdecho"))(setvar "cmdecho" 0)(setq OLDnomutt (getvar "nomutt"))(setvar "nomutt" 1)
(if (setq ss1 (ssget "X" (list (cons 0 "VIEWPORT"))))(if (setq ss (ssget "x" '((0 . "VIEWPORT") (-4 . "/=") (69 . 1))))
 (command "CHPROP" ss1 "" "LA" "0-VPRT" "") ))
(if (setq ss1 (ssget "X" (list (cons 0 "VIEWPORT"))))(if (setq ss (ssget "x" '((0 . "VIEWPORT") (-4 . "/=") (69 . 1))))
 (command "change" "p" "" "p" "color" "bylayer" "")   ))

[code]...

Factory Design Suite Ultimate 2012
AutoCAD 2012 | Inventor Professional 2012 | Vault Professional 2012

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select All In Macro

Jun 19, 2013

Trying to add this macro to a new command in my cui. Does Select all not work in macros?

^C^Clayiso;;_select;all;;_chprop;la;c-rway-x;;

View 8 Replies View Related







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