AutoCAD 2013 :: Adapt Lisp To Allow To Select Multiple Target Blocks To Be Overwritten

Oct 22, 2013

I've found a .lsp that does nearly what I require. The lisp that I've got allows you to identify a block, and have another block replace it.

Is it possible to adapt this lisp to allow you to select multiple target blocks to be overwritten?

(defun c:rblk (/ pre nb ss i en ed) (while (or (not pre) (not (snvalid pre)))
(setq pre (getstring "Existing BLOCKs Name Prefix: "))) (while (not nb) (setq nb (getstring "
New BLOCK Name: "))

[Code] .....

In this particular instance, I'm trying to have multiple different door symbols in a 2D plan overwritten with a uniform marker.

View 8 Replies


ADVERTISEMENT

AutoCAD 2013 :: Select Similar - Using Dynamic Blocks With Multiple Visibility States

Sep 26, 2013

we have moved from AutoCAD MEP 2012 to AutoCAD 2014 recently using Dynamic blocks with multiple visibility states.

in 2012 we could select a dynamic block with a specific visibility state and select similar, it would only select the visibility state that was previously selected.

in 2014 that is no longer an option WTH?

i have tried a couple of system variables to no avail (pickadd, selectionmode)2014

selectionmode is not a valid SV in 2012

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select All Blocks Like Selected Blocks With Window?

Feb 28, 2011

(defun CELBLKS ( / e blk ss blkl)
 (setq blkl ""  ss (ssadd))
 (while (setq e (entsel "

[Code]....

i have this lsp, it works great but how can modify it if i want select with a window.? exemple: if i have 3 differentes blocks, i want to select them with windows and the lisp select all blocks that are identical of those 3.?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select All Anonymous Blocks

Mar 11, 2005

I want to explode all anonymous blocks, but how do I create a selection set of them.?(ssget "x" '((2 . "*U*"))) doesn't work, and is dangerous if you have any blocks with the letter 'u' in them.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Blocks By Attribute Layer

Dec 16, 2013

I would like to select blocks based on the layer of one or more attributes.  The obvious method would be to isolate that layer and select the ones with attributes that display. But many of the values are empty!

View 9 Replies View Related

AutoCad :: Lisp Routine Exist That Select Similar Microstation Blocks

Apr 17, 2012

I have a previously converted Microstation drawing in Autocad 2011. In the conversion all blocks were given unique names. I would like to edit similar blocks globally. Many of the Microstation blocks look like the standard blocks I use. Does a Lisp routine exist that can select similar Microstation blocks and give them a single name?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: User Is Prompted To Select A Row Of Blocks?

Oct 25, 2011

I am looking for a way where a user is prompted to select a row of blocks and then that row is completely mirrored about the middle of the selection set - such that if the blocks are originally inserted, from left to right "A" "B" C"  then after mirroring, we want them t occupy (roughly) the same space in the drawing area as "C" "B" "A".

Then, immediately after mirroring that selection set in place, each individual block that makes up the selection set is mirrored about its insertion point along the x axis..... basically i need to mirror a selection set of a row of blocks so I change their order of occurrence and then mirror each individual block back again to the way it is meant to look.

Is this possible?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Quick Select All Blocks From Specific Layer?

Mar 1, 2012

how to quick select all the blocks from a specific layer (for instance XPTO) and export them along with their attributes, exactly as we do by quick selecting them and then, through AutoCAD Express -> Attribute Export Info, but in a script...

View 9 Replies View Related

AutoCAD Dynamic Blocks :: Multiple Visibility Lisp Routine

Jan 23, 2012

Could the users of this Lisp post the several Versions here for others to find?

I have come across a few in the AUGI Dynamic Block Forum who would like to make use of the Lisp but may be running into Version problems.

View 5 Replies View Related

AutoCAD 2013 :: Multi Select Blocks Contained Within Array

Nov 30, 2012

Looking for a method of selecting multiple blocks that have been arrayed within a drawing. I have tired with filter and qselect however there is no way to filter out blocks by name contained within an aray. Would be great if there was a .lsp routine or arx file that could deal with this.

Autodesk Inventor Professional 2013 SP2 64-Bit Edition
Windows 7 HP Z400, Intel Xeon W3550 3.07GHz
12.0GB RAM, ATI FirePro V4800 (FireGL)

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Attribute Values From Multiple Blocks With Same Name?

Mar 21, 2013

This time I'm wrestling with getting the values from multiple blocks. The blocks all have the same name but at least the attributes have names this time. Each block have exactly 4 attributes, like: att1 (a number representing chronological order), att2 (some data), att3 (the actual date as a string of when the data was added), att4 (some more data)

I need to get and store the attribute's values. I was hoping to make a selectionset of the blocks and step through using the chronological order number.

At this point I have tried several combinations of foreach and ssget "x" (list (cons 2 MYBLOCK)), but I keep getting errors that I'm sure are telling me that I'm not passing the correct information to the function for iterating through. I'm banging my head.

(DEFUN c:GFOR (/ ATTLST REVBLK CNT CNT1 BLK RBLK ATTVAL ATT REV#)
(SETQATTLST(LIST "R#" "INIT" "DATE" "DESC")REVBLK(ssget "x" (list (cons 0 "INSERT") (cons 2 "REVISION")))CNT0CNT10 )
(vlax-ldata-put "dict" "RevTotal" (BLKCNT "REVISIONS")) (FOREACH BLK REVBLK (SETQ RBLK (ssname BLK CNT1)) (setq ATTVAL (mapcar '(lambda (x) (vla-get-TextString x)) (vlax-invoke (vlax-ename->vla-object RBLK) 'GetAttributes))) (foreach ATT ATTLST (SETQ REV# (STRCAT "REVISION" (1+ CNT)))
(vlax-ldata-put "dict" REV# (member ATTVAL)) (setq CNT (1+ CNT)) ) (SETQ CNT1 (1+ CNT1)) ) (PRINC))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Redefining Multiple Blocks Within Drawing

Mar 23, 2003

I have a lisp routine that uploads all the blocks contained within a specific folder and inserts or redefines all blocks of the same name within the current drawing.

My problem is that when I run the routine I prompts me that it can't fine the folder? I created a folder called "blocks" and is located straight onto my C:..........but it still doesn't work.

;FUNCTION TO UPDATE ALL BLOCKS WITHIN A DRAWING
;FROM A SPECIFIC DIRECTORY

(defun c:bup()
(SETVAR "cmdecho" 0)
(setq sst (ssget "X" (list (cons 0 "INSERT"))))
(setq c1 0)
[code].......

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Rename Multiple Blocks - Add Suffix?

Oct 30, 2012

I am looking for a lisp routine or rename mulitple blocks by keeping the same name, but adding a suffix to it.

I have used "rename" block to add a prefix to multiple drawings, but it doesnt let you add a suffix. (As far as I can see)

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Multiple Blocks Attributes

Feb 27, 2013

We wanted to automatically fill a block's attributes from a selection in Excel. I have a piece of code that has the user select/pick a block to fill. What I want is for the selection to fill multiple blocks in an active drawing. Some of the blocks are the same - which means the same tags/attributes. I've included the code that allows the user to select the block and throws the Excel selection to certain attributes.change the code so that

1) I don't have to manually select blocks - it will find them.

2) One cell (from Excel) will go to multiple blocks - some are same block name.

3) An IF statement that if a certain cell isn't blank/nil

(pretend it would be (nth 21 vl) change DESC11 to XYZ and DESC12 to ABC. For Block namesake we'll call one, BLOCK1 (say it has 3 instances and gets different info in each case) BLOCK2 (say it has 2 instances, also gets different info) BLOCK 3 AND 4 both have an attribute - DESCAA1 that gets different info from Excel.

(defun C:AUTOFCM (/*error* adoc attribs blkobj enExcelapp Sel Sht Rng vl Wbk ) (defun *error* (msg)(if adoc (vla-endundomark adoc)) (if (and msg(vl-positionmsg '("console break""Function cancelled" "quit / exit abort") ))(princ msg)(princ "Error!") ) gc) (princ) ) (or adoc (setq adoc (vla-get-activedocument (vlax-get-acad-object))) ) (vla-startundomark adoc) (alert "Select a range of cells in Excel.") (setq ExcelApp (vl-catch-all-apply (function(lambda ()vlax-get-or-create-object "Excel.Application") )) ) ) (if (vl-catch-all-error-p(setq Wbk(vl-catch-all-
[code]....

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multiple Select Attribute Colour?

Nov 11, 2011

Lisp program, by selecting on screen multiple block attribute and to change those selected (by picking) attributes to colour 252.

At the moment, I'm using a custom macro : ^C^C-ATTEDIT     C;252;;

But if I've got a lot of attributes to change, it takes awhile to complete.

I know about BATTMAN but I do not want to change the block entities in that way. The reason I want to change the attributes to colour 252 is because here at this company we do existing drawing in colour 252 and any new equipment on its proper layer colours.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Multiple Objects And Change Them?

Sep 5, 2013

I am trying to select multiple objects and change them. However, the following code lets me only change one at a time. Even when I select a window around obejcts, it only changes a single item.
 
start of Same_Cannoscale.lsp(defun C:SCS ( / anno-v ent dict cansc entsc sc-list test oce)
(setq anno-v (getvar "ANNOALLVISIBLE")) (setvar "ANNOALLVISIBLE" 1) (if (= (getvar "CVPORT") 1) (princ "
In Paperspace. ") (if (setq ent (ssget ":S:L"))
[Code] ........

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Upgrade Function To Grab Multiple Blocks?

Jan 23, 2012

I was able to find/update a LISP program that returns the dynamic block to its original state, overriding the anonymous name and make the actual block name the effective name. I am in the process of manipulating the LISP program so I can select multiple blocks rather than one at a time.

(defun CYMEFFEC ()(vl-load-com) (setq obj (vlax-ename->vla-object (car (entsel "Select blocks: ")))) (vlax-put obj 'Name (vlax-get obj 'Effectivename)))

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Updating Thousands Of Blocks In Multiple Sub Folders

Feb 4, 2013

I have to update a block in literally thousands of cad files. I have the book "AutoCAD Secrets Every User Should Know About" and the author gives examples of this by using a Batch File, Script File, and then Lisp Routine. Any easier way to do the following:

Insert "Gennnotes=" (updating the block) into any drawing that has this block in the drawing already, if not Quit.

Typically to do this I would open the drawing "insert" "gennotes=", then cancel the command and save the drawing. I have a lot of subfolders that also hold drawings so the command would have to search through each subfolder for dwgs.

Like I mentioned above, I tried to use the Batch File/Script Method but my batch file failed. It could find the folder Autocad 2012 - English. For some reason it was not seeing the spaces in between. Not sure. Here's the batch file portion of the routine:

Batch file:

For /r C:Sybex %%f in (c:sybex*.dwg) do start /wait
C:ACAD2012Autocad 2012 - Englishacad.exe "%%f" /b
C:gennotesupdate.scr

View 4 Replies View Related

AutoCAD 2013 :: Select Multiple Objects

Sep 10, 2013

I have a lot of polylines that are all over a drawing from an outside source. Unfortunately the only unique properties about them are:

AREA = .14 sq in
PERIMETER = 1-11/32"

Everything is on the same layer, color by layer and are at the same elevation.

Any way to select just these closed polylnes? I tried quickselect but the AREA option did not work (it wouldn't except just the .14 value), and there is no apparent PERIMETER value to select.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine For Modifying Object Properties In Multiple Blocks?

Dec 27, 2013

I have a CAD file with a couple hundred detail blocks in it, and I am trying to standardize them without haing to block edit each detail block.

What i am trying to do in each block is as follows:

- Explode all dimensions, leaders, and blocks

- Change all objects to layer "0"

- Change all lineweights to default

- Change all object on colors 7 and bylayer to byblock

- Change all text and mtext to arial font

- Delete all points

Civil 3D x64 2012
Win 7 x64 Ultimate
I7 3820 (3.6ghz quad core with HT)
32gig RAM (Corsair XMS3 4x8g)
Intel x z79 mobo (BOXDX79TO 2011 socket)
Radeon HD 7850 2gb GDDR5

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Multiple Instances Of Text (dtext) With Different Strings

Apr 23, 2012

I am trying to select multiple instances of text (dtext) with different strings but want to change all of the fomats to the same settngs.  I have searched high and low on the web to no avail.  I am using AutoCAD 2012.

For example:  I want the routine to find all instances of "AA", "AB", "AC", "AD", "BA", "BB", "BC", "BD", etc... all the way up to "ZD".

Next I want all of those text entities to change to the following text formats:

Text Style = STANDARD_96Layer = F-ANNO-CKTText Justification = MIDDLE CENTERText Width = .8

Getting this to work with just finding one string at a time with the ssget function seems simple enough, but it's getting it to work with multiple strings that I can't get past.

View 8 Replies View Related

AutoCAD 2013 :: Insert Multiple Blocks Using Script?

Nov 15, 2013

It inserts the first block and then quits. I had to change the the file to a txt to get it to upload

View 6 Replies View Related

AutoCAD 2013 :: How To Insert Multiple Blocks At Same Time

Dec 3, 2012

I was inserting blocks. I was trying to insert more than one block at the same time. If I have to insert each block every single time, that's just so slow. There must be another way to make it easier to bring up more than one block at the same time. 

I am using both Mac version and windows version of AutoCAD. In the mac version, when tried to open up block editor, for some reason, it says the BLOCKEDITOR = 0 (read only). I couldn't even get into block editor to make changes for my block.

View 3 Replies View Related

AutoCAD 2013 :: Change Color Of Multiple Blocks?

Nov 18, 2012

If we want to change the color of a block we have to open block editor and change the color from there.

If in a design we have 100 blocks and we want to change their color to the same (say black), how can we do that? Do we have to do it for every single block or can we select all 100 blocks and change the color uniformly?

View 3 Replies View Related

AutoCAD 2013 :: Way To Calculate Lengths Of Multiple Blocks

Jul 24, 2012

Are there any working .arx files or lisp routines that would enable me to calculate a total length of multiple blocks ? I know there is TLEN out there but this does't work for blocks, I need something that will calc combined lenghts of my user defined blocks which are basically simple lines of varying lenghts.

View 5 Replies View Related

AutoCAD LT :: Select Multiple Items Without Having To Hold Down Shift Key In 2013?

Mar 14, 2013

How do I select multiple items without having to hold down the shift key in ACLT 2013?  I didn't have this problem in 2010.

View 3 Replies View Related

AutoCAD 2013 :: Quick Select Only Shows Multiple Under Object Type

Jun 12, 2013

Civil 3D 2013
Windows 7 x64

I've found several people that had this problem through searching, but none of the fixes worked for me.  I'm unable to use the quick select feature as it does not list anything other than "multiple".  I've tried different files, different selections, repaired the installation, complete reinstall, updated with SP1 and hotfix 3 to no avail.  I also have Autocad 2007 with SP 1 installed, as well as Autocad Architecture 2014, if that makes a difference.

View 9 Replies View Related

AutoCAD 2013 :: Lisp Routine For Multiple Layout Tabs?

Nov 25, 2013

LISP routine that can create multiple paper space layout tabs and can name them incrementally.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set TARGET Variable

Apr 23, 2013

I am trying to change the current TARGET variable to 0,0,0. If the variable is not changed is causes problems with plotting. I have the VBA that will change the TARGET variable. VBA works no problems. I am wanting to replicate in LISP because I do not want to have to convert to .NET and do not want to make sure the user has the VBA loded on thier system.  Here is what have so far.

;;;Get active viewport
(setq avp (vla-get-ActiveViewport (vla-get-ActiveDocument (vlax-get-acad-object))))
;;;Get current TARGET variable
(setq CTarget(vla-get-Target avp))

Here is the problem. Is changing or putting the vaiable.I have tried

(vla-put-Target avp (vlax-3D-point '(0.0 0.0 0.0)))

and

(vla-put-Target avp (vlax-make-variant (vlax-3D-point '(0.0 0.0 0.0))(vlax-variant-type  CTarget)))

They either error out or nil with no change. I have even tried to locate it in the Dictionaries.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Multiple Text To Heal Instead Of Single Text?

Aug 1, 2013

this code is used to fix specific font but its problem that it will prompt you to select single text 

i need to make it to select multiple text so it saves me a lot of time, 

;;; Process Individual request
(defun cht_ProcessIndividual ()
(setq sslen (sslength sset))
(while (> sslen 0)
(setq temp (ssname sset (setq sslen (1- sslen))))

[Code]...

View 2 Replies View Related

Photoshop :: Select Target Shadow Color

Apr 21, 2009

double clicking on the shadow eyedropper in the curves dialog, I should get to the "Select target shadow color" dialog box. However, I only get a color dialog box.  

View 5 Replies View Related







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