AutoCad :: Replace Only Selected Blocks With A Different One?

Feb 11, 2011

I have 20 blocks named "george" in my dwg. Now, I would like to replace only 7 of them with the block "george2". Is there a simple way to do it just by selecting these 7 and replacing their definition without changing the other 13 "george" blocks?

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Find And Replace Group Of Blocks That Are SELECTED

Jul 17, 2013

I having real difficulty finding a lisp that will find and replace blocks.  There are plenty out there and AutoCAD 2013 and lower has a Find and Replace Blocks.  However, the frustrating catch is I can seem to find a routine that will allow me to replace only those blocks that I select with a selection set of my choosing.  The built in function replaces all of them and will not let you exclude some.  We have PID drawings that we want to replace valves on, but not all valves.  We don't want to rename.  We don't need to BEDIT the existing block. 

1) Pick group of blocks

2) specify a new block that will replace all instances of old block

3) replace inserted block with different block.  Leaving others alone.

I'm thinking this should be easy, but my search has failed.  The blocks in question are not dynamic or attributed either.

View 3 Replies View Related

AutoCad 2D :: Replace Dynamic Blocks With Normal Blocks Based On Parameters

Aug 2, 2012

We used a bespoke program to convert our drawings to Java applets for web usage. This does not cope with dynamic blocks at present and we have started to receive drawings from our clients using them.

I need to replace this with standard static blocks based on one of two criteria. Either:

1) Replace based on visibility state (have generic chair block with multiple different chair types set by visibility type, need to replace depending on which type it is set as)

2) Replace based on parameter (have table with size set by dimensions, need to replace with static block for each dimension)

View 0 Replies View Related

AutoCAD Dynamic Blocks :: Replace Standard Blocks

Jun 20, 2012

I was trying to alter the standard blocks on the tool palette. How I messed everything up but I basically have two huge problems now.

1. I am missing the necessary default blocks that should be under my edit block directory.....all the Aecb files.
2. Now when I try and put in a receptacle or any other standard block a triangle with an exclamation point shows up upon insertion.

I attached a picture of the "edit block definition" and the troubled symbols.

View 1 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 :: Replace Donuts With Blocks?

Aug 12, 2011

I have structural drawings and all the rebar is donuts. I've decided to make it a block so I can add it to Tool Palettes. Is there a way (Lisp perhaps) to replace all the donuts in an existing drawing with these new blocks?

View 9 Replies View Related

AutoCAD 2010 :: Batch Replace Blocks

Feb 22, 2012

We've recently converted all our microstation drawings to autocad now that the company has decided to go with one cad program company wide. One of the issues we are having after getting the drawings back from the this co. converting them is the cells to blocks conversion inside the drawing. when we open a drawing and see a "Fuse" block for instance and if it a has multiple inserts, it named them:

Fuse
Fuse_1
Fuse_2 etc....

is there a lisp routine or some command that would replace the "Fuse_*" blocks with "Fuse"..I've been searching the forums and know about the express tool Replace Block but need to be able to automate somehow. I thought about trying to rename each of the "Fuse_*" but of course it won't let you rename to a block name that already exists.

View 1 Replies View Related

AutoCad 2D :: Search / Replace Exploded Blocks

Jun 8, 2012

We received a drawing in which every single block has been exploded, they are just a bunch of polylines now. The company we received it from says they don't have a drawing with the original blocks...sure... The long and the short of it is that we need to replace every exploded block with our standard blocks. Is there some crazy way to search and replace a pattern of lines or basically, search and replace the exploded blocks. A lisp routine, anything. There are thousands of exploded blocks by the way, thousands.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Replace Blocks

Feb 22, 2012

We've recently converted all our microstation drawings to autocad now that the company has decided to go with one cad program company wide.

One of the issues we are having after getting the drawings back from the this co. converting them is the cells to blocks convertion inside the drawing. when we open a drawing and see a "Fuse" block for instance and if it a has multiple inserts, it named them:

Fuse
Fuse_1
Fuse_2 etc....

is there a lisp routine or some command that would replace the "Fuse_*" blocks with "Fuse"..I've been searching the forums and know about the express tool Replace Block but need to be able to automate somehow.

I thought about trying to rename each of the "Fuse_*" but of course it won't let you rename to a block name that already exists..

View 1 Replies View Related

AutoCAD Dynamic Blocks :: Find And Replace Within Visibility List

Apr 29, 2013

The standard AutoCAD Find & Replace dialog doesn't seem to work on a dynamic block's visibility states. I have quite a few blocks with 8-10 visibilities in each one that I need to change.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Replace All Blocks

Oct 5, 2011

I am looking for a routine that will replace all blocks named "DgnMisc_nodepoleind" with a block named "DgnMisc_nodepoleind2" keeping the insertion point. I could use (command "-insert" "DgnMisc_nodepoleind=Y:/ACAD2007/DA settings/Library_new_scale1/DgnMisc_nodepoleind2.dwg" NIL ) but my problem is that the block I want to replace is used on two different layers and I only want to replace the ones on layer "TPSYM01".

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Search And Replace Predefined Blocks

Jul 11, 2013

1) I want to search the drawing for the pre-define block names given in the program.
2) If the are there, I want to replace them with the new version.
3) Program replaces the first block it finds, then tries to insert that block.

View 9 Replies View Related

AutoCAD 2010 :: Replace Dynamic Blocks With New Ones - Anonymous Names Are Created

Jan 19, 2012

I recently updated our CAD Library to dynamic blocks. In the process of updating our drawings, we realized that we could not use BLOCKREPLACE to replace dynamic blocks with another dynamic block (with new name) once the dynamic element has been changed. I realize that this changes the state of the block and anonymous block names are created.

I need a simple solution so that members of my group can easily replace dynamic blocks with new dynamic blocks.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replace Block On Different Layers With Different Blocks

Jun 20, 2012

I was able to write a LISP that replaced each node with a block of my choice.However, now I need to find a way now to replace the blocks with different blocks.Each point shares the exact same block called "PILE". Different blocks are on different layers and have 11 different colors. I'd like to replace blocks on layer 1 with a block called "1" and blocks on layer 2 with a block called "2" and so on.I was hoping there would be an easy way to do this in LISP, but I've been unable to get any of my scripts to work.

I've attached a link that visualize what my drawing is currently looking like: [URL] ......

View 2 Replies View Related

Illustrator Scripting :: Replace Layer Names In Selected Layers Only?

Jan 22, 2014

I am using this script to find and replace words in layers. (The script only targets particualr words, rather than the whole layer name).
 
I would like to make it so it targets selected layers only.
 
I have found this script which loops through selected layers only, but I am not sure how to add the find and replace layer name functioality.

View 7 Replies View Related

Illustrator Scripting :: Allow To Select Image To Replace Any Number Of Selected Files

Apr 18, 2013

I've written a script to allow you to select an image to replace any number of selected files.  Each file starts out as an embeded image with a .note to determine where the basis of alignment for the new file should be (i.e. "top," "bottom," "left," "right").  You'll find the code below:
 
#target illustrator
 
if (app.documents.length > 0) {
    var docRef=app.activeDocument;
    var docSelection = docRef.selection;
    // ** Get new file
   
[Code]...
 
For some reason, the ".note" added at the end of the script gets erased once the script is complete.  I can even get it to confirm that it applied the note to the image, but once it's complete, it's gone. 

View 6 Replies View Related

AutoCad :: How To Copy Selected Blocks With New Name

Aug 21, 2008

How can I copy selected blocks with new name? or one by one but in fast way? I am doing that using BEDIT but doing one by one and talks long time.

View 9 Replies View Related

AutoCAD .NET :: Nested Blocks From Selected Subentity

Sep 27, 2013

I'm attempting to have the user select mText from a nested block within a block and then copy the nested block to model space out of the block. I'm able to change the mText successfully, but when I attempt to get the nested block it is not in the list of GetContainers() it only contains the block in model space and the model space block. The nested block is missing in the list. I'm using AutoCAD Civil 3D 2013. 

Here is the code to select the mText object which works correctly.
 
Sub GetNestedMtext() ' Have the user select an object. Using the prompt provided. Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor Dim entopts As New PromptNestedEntityOptions(Environment.NewLine & "Select a mText in block to replace: ") entopts.Message = Environment.NewLine & "Select a mText in block to replace: " Dim ent As PromptNestedEntityResult = Nothing Try ent = ed.GetNestedEntity(entopts) Catch ed.WriteMessage("You did not select a valid entity") End Try If ent.Status = PromptStatus.OK Then CreateDuplicateBlockInModelSpace(ent) End If End Sub
 
Here is the code that attempts to get the nested block which is missing the nested block.
 
Private Shared Sub CreateDuplicateBlockInModelSpace(ByVal ent As PromptNestedEntityResult) Try Dim containerObjIds As ObjectId() = ent.GetContainers() Dim blkToExtract As BlockReference = DirectCast(containerObjIds(1).GetObject(OpenMode.ForRead), BlockReference) Dim blkToPlace As BlockReference = blkToExtract.Clone() Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument Dim db As Database = doc.Database Using tr As Transaction = db.TransactionManager.StartTransaction Dim acBlkTbl As BlockTable acBlkTbl = tr.GetObject(db.BlockTableId, OpenMode.ForRead) Dim acBlkTblRec As BlockTableRecord acBlkTblRec = tr.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), OpenMode.ForWrite) acBlkTblRec.AppendEntity(blkToPlace) tr.AddNewlyCreatedDBObject(blkToPlace, True) tr.Commit() End Using Catch ex As System.Exception End Try End Sub

 Is there another way I can get the parent block object for the nested object? 

View 5 Replies View Related

AutoCAD Map 3D :: Quick Selected Blocks Don't Display But Their Properties Do

Oct 30, 2012

I am trying to get back some of my work that was "lost" when a crash accured. I had 16 blocks (all the same) inserted into my map at the correct locations. I recovered the drawing but noticed that the blocks weren't displaying. I conducted a quick select for the layer which they're on; it stated 16 items were selected (but they are not displaying). While they are still "selected" I checked the properties & it stated all the correct information (quantity, block name, color, layer, scale, etc...). I made sure all layers associated with the block were not frozen. So it's acting as though they're still in the drawing, but aren't displaying...

View 1 Replies View Related

AutoCAD 2010 :: 2012 Hangs When Blocks Or Polylines Are Selected?

Mar 9, 2012

Whenever I select a block or polyline in 2012, the program hangs for about 1 minute.  This never happens when using 2010 on the same system.  Obviously this can't continue. 

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add Attribute To Selected Blocks (XY Coordinates)

Nov 30, 2012

i have found the following lisp in a previous thread: (shows XY coordinates of the selected blocks)

(defun C:MyFunc (/ ss Index Ename Lst)
(while (or (not ss) (= 0 (sslength ss))) (setq ss (ssget '((0 .
"INSERT")))))
(if ss

[Code]....

I want this information to be added to the blocks as hidden attributes so that i can extract them by attout. The work to be done is : attout to excel, autofill an attribute (numbering) then attin.

but my problem is that i cant think of a way to number those blocks IN ORDER (ie top to bottom or left to right) unless by sorting them in excel first by their x or y coordinates

View 9 Replies View Related

AutoCAD 2013 :: Batch Conversion Of All Or Selected Blocks To Mass Objects?

Sep 30, 2013

I need to export many library elements (conveyors) which are saved in individual blocks to mass objects. I need to convert them to IGES after that.

Until now I have to open every single block and convert all of it to a mass element. This simply takes too long.

Is it possible to write a small script or program which converts all blocks or the selected blocks to mass elements?

- 2500K @ 4.2Ghz- 8GB - Radeon7970 -
- Xeon 1230V2 @ stock Ghz- 32GB - Quadro 2000 -

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Place Circle On Selected Blocks Insert Point?

Mar 11, 2013

You have a dwg with multiple sets of different blocks and a circle you want to place on the insert point of each set blocks. 

You select the circle then select one of the blocks in the set and the circle is placed on the insert point of each of the blocks in that set. It would save time from doing it manually and save on mistakes.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Automatically Export Attributes From Selected Blocks To Defined Txt File

Oct 3, 2012

How to create a lisp to automatically export attributes from selected blocks to defined txt file without having to everytime confirm the file name, location and if the file shall be replaced?

Meaning is that I often export attributes to txt file for further use. It is always the same file (I just overwrite it always).

The way I do it now is selecting blocks, using ATTOUT command, then going to the desktop, selecting ATT.txt file and confirming that it is to be replaced.

Is there a way to make lisp or script that will just do all it in at once?

I found on forum such a lisp as below, but it exports all ablocks on drawing and it exports to txt file which is located in same  place as drawing and with same name as drawing. Tried to modify it but without success:

(defun cut-att ()
(load "attout")
(setq fna (strcat (getvar "dwgprefix")
(acet-filename-path-remove (acet-filename-ext-remove (getvar "dwgname")))
".txt"
))
(setq ss (ssget "X" '((0 . "INSERT") (66 . 1))))
(bns_attout fna ss)
)

Same question for ATTIN - I use attin and always same file name from same location - how to automate it with one command?

View 9 Replies View Related

AutoCAD Civil 3D :: Find / Replace After Export It And Replace Star With A Column

Feb 23, 2012

i have a csv file that has 6 columns, PNEZD and a 6th column which is my notes..i type a star in the data collector after my code, make my note, and then find/replace after i export it and replace star with a column..that gives the desired 6th column in excel that my boss wants....problem is he also wants to see that next to the Full Description in Civil 3d 2012...i tried adding a Point File Format with a 6th Column, User Defined, String for type...named the column Notes...but if i go to edit the point there is no 6th column in the Tool Palette.

View 1 Replies View Related

Photoshop :: Why Would Font Size Differ Between Selected And Non-selected Text

Mar 29, 2013

I've encountered a strange issue in PSDs I've inherited from another designer.
 
When I have a text layer selected with the type tool active, the font size reads correctly (say, 40px). When I actually select the text with the type tool, the font size gives a strange number (say, 38.74px).
 
See the screenshots below:
 
This is on OSX 10.8.3, Photoshop CS6.

View 1 Replies View Related

Lightroom :: Filmstrip Selected / Not Selected Hard To Distinguish

Jun 12, 2013

On LR 4 and now 5, the shades of grey used to distinguish the selected vs, not selected images in the filmstrip at the bottom of the workspace are too close together making it difficult to see what has been selected.  Is there someway to control the color and/or the shade of grey used for each to make it easier to tell at a glance which image(s) is currently selected?

View 1 Replies View Related

AutoCAD Dynamic Blocks :: Zoom All & Extents With Blocks Containing Fields On Layout Tabs

Aug 22, 2013

We have a new title block which now contains various fields to automatically populate the drawing number, number of sheets, issue etc.  The problem we have is when we go to zoom all or extents on a layout tab it moves the layout to the right each time.  If we only have one layout or we use a plain title block i.e. with no fields, the zoom works fine (layout stays put in the center).  This is also true if we directly insert a field onto the layout - again no problems. 

The cause of the problem only happens when a block containing a field is inserted onto the paper space of a layout and,there are multiple layouts containing blocks with fields.

View 6 Replies View Related

AutoCAD Dynamic Blocks :: Finding Number Of Times Specific Blocks Used In A Drawing?

Aug 8, 2013

How to find no of times specific blocks used in a drawing?

View 9 Replies View Related

AutoCAD Dynamic Blocks :: Stretching Same Parameter In All Blocks In Drawing From One Field?

Jul 15, 2011

How do I manipulate a height parameter all of the dynamic blocks in the drawing from one single field? Say a field located in the drawing properties or on the drawing itself.

For example:  Multiple blocks of different walls of same height with other blocks of things on located on those walls, dependant on the wall height, all linked to and changed by a single field. Possibly a Wall Height field located in the custom tab of the drawing properties.

I can pickout each of the blocks and change them at the same time in properites menu because they all share the same parameter name.  I would just like to have that height parameter of every block in the drawing, that has that specific parameter controled by a single field.  Which I could enter a new height at anytime that would change every block in the drawing to that height.

View 1 Replies View Related

AutoCAD Dynamic Blocks :: Add Exact Same Objects And Visibility State To Blocks

Jan 7, 2014

I have over 100 blocks that I need to add the exact same objects and visibility state to.  Is there a way to globally make this change, or even to copy the visibility states from one block to the next without having to recreate the states in each block?  I thought I had previously run across a routine on here that would make changes to multiple blocks at once, but I can't seem to find it now.  

View 1 Replies View Related







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