AutoCAD VB :: Redefine Block Definition From Another File?

Dec 7, 2011

how I can get VBA to insert/redefine a block reference from another file into a block (of the same name) that already exists in the target drawing?

I've tried using the insertblock method but it produces a 'filer error' - As a bonus point, it'd would also be good to be able to retrieve the contents of the blocks collection in the source drawing in some clever way other than opening it (a bit like browsing using the design centre) ?

ACad, MEP, 3DS Max
Windows 7x64
X5482 @3.2Ghz 8Gb Ram
Quadro FX1700

View 2 Replies


ADVERTISEMENT

AutoCAD .NET :: How To Redefine A Block

May 14, 2012

How do I redefine a block... 

I want to insert the new block definition in the place of the old one and overwrite it. 

The new block has more attributes than the older instance. 

What a good method of going about that? 

View 8 Replies View Related

AutoCAD 2013 :: How To Redefine Dynamic Block

Apr 16, 2013

I have a drawing with multiple instances of a dynamic block. I have a second drawing with said block modified.

I want the first drawing's block to be updated to the modified block without reinserting each block separately.

I don't have the block as a separate file to "insert", only available to copy. With it being dynamic, I don't trust using the block editor and just copy/paste from the modified into the original.

Is there a way to redefine the block?

View 4 Replies View Related

AutoCAD 2013 :: Redefine Block Error

Dec 12, 2012

I am trying to edit a description of a block and by following what is in the help it gives me an error.  See attached jpeg for error message.

View 5 Replies View Related

AutoCAD .NET :: Replace Or Redefine Block Record?

Aug 6, 2012

'How I can replace or redefine block record?'.

I tried the following:

1. Get all the block references

2. Clone it

3. Save to new DateBase

4. Erase old Block REferences and Block Record

5. Copy block references from new DataBase

But it doesn't work.

View 3 Replies View Related

AutoCAD .NET :: Error While Changing Block Definition Of An Block Reference

Oct 21, 2013

I'm trying to change block the definition of an block reference.

I did something like this:

blockreference.BlockTableRecord = newBlock.ObjectId;

In most cases this works well. However I found a case that it not work as well. When I try to change the definition from a new block that I have created in my test DWG, it disappears from the model.

View 6 Replies View Related

AutoCAD LT :: Tool Palette Redefine Dynamic Block

Aug 1, 2013

I'm trying to insert a block, wich contains 2 nested blocks:

1 dynamic block
1 annotive block which has a scale 1:200 with an attribute.

when i'm inserting it trough the toolpalette, and my annoscale is 1:100, the annotive block is converted to the annotive scale 1:100, instead of the 1:200 wich it originally is.

I can't set the annotationscale in the toolpallete, exept when i use macro's. but this also has a drawback.

when i'm inserting the block with a macro, i have to insert a complete drawing wich contains only this one block.This block contains dynamic parameters (i can't add dynamic parameters outside of the blockeditor)

When this block (dwg) is inserted, i explode the block so it becomes the dynamic block again. but the block cannot be redefined, because the actual inserted block is a dwg file.

Is it a drawback of the use of the toolpalette and dynamic / annotive blocks?

View 9 Replies View Related

AutoCad :: Replace / Redefine Block Removing Attributes

Aug 27, 2007

I'm working with some "dirty" blocks that contain several attributes. I've cleaned the blocks up by wblocking, cleaning, & purging the newly created block. I also removed any attributes within the file, including those within blocks within the file. I then renamed the file and inserted it into the drawing, and did a replace block with another through express tools. The problem that I have is the blocks are replaced with the clean version, yet the attributes remain. Is there a solution to this. I do not want any attributes to remain and the only way I know how to fix it is to replace them one at a time.

Also, I'm using AutoCAD 2004.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Redefine Existing Block

Jan 29, 2012

I am using the following function to create a block:

(defun crea-blocco (ip blockname gruppoogg / blkobj sArray c r vla-objects doc) (setq c -1) (repeat (sslength gruppoogg) (setq r (cons (ssname gruppoogg (setq c (1+ c))) r)) ) (setq r (reverse r)) (setq vla-objects (mapcar 'vlax-ename->vla-object r)) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (setq blkobj (vla-add (vla-get-blocks doc) (vlax-3d-point ip) blockname)) (setq sArray (vlax-safearray-fill (vlax-make-safearray vlax-vbObject (cons 0 (1- (length vla-objects)))) vla-objects)) (vla-copyobjects doc sArray blkobj) blkobj)
 
But if I start this function two times with the same block name, I get a block with the selected objects added to the existing block.

How can I redefine an existing block with vlisp?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Block Redefine With A Difference?

Aug 15, 2012

I am trying to redefine Block A to Block B, Block C & Block D based off the value of an Attribute in Block A.

If the Attribute in Block A is "1" then redefine to Block B
If the Attribute in Block A is "2" then redefine to Block C
If the Attribute in Block A is "3" then redefine to Block D

I know it should be able to be done using If and Cond functions within a lisp routine, but I am in a hurry with it and don't have the time to research it anymore.

View 8 Replies View Related

AutoCAD .NET :: Update Field Data - Redefine Block Attributes

Jul 7, 2011

I've got a block with multiple attributes. This is not a problem to redefine the blocks attributes.

Some of the attributes contains dynamic fields (blockplace holder x y z parameters) When i insert a block with such atributes that includes the blockplaceholder dynamic fields i get

X: InsertionPoint => It is recognized as an Dynamic field but displays InsertionPoint. and does not update the value.

How can i update the fielddata from vb.net?

Part of the code I use (where i think the problem is)

For Each attid As ObjectId In refbtr attent = tr.GetObject(attid, OpenMode.ForRead) If TypeOf attent Is AttributeDefinition Then Dim attdef As AttributeDefinition = attent Dim attref As New AttributeReference() attref.SetAttributeFromBlock(attdef, myBlockRef.BlockTransform) Dim attrefid As ObjectId = myBlockRef.AttributeCollection.AppendAttribute(attref) tr.AddNewlyCreatedDBObject(attref, True) End IfNext

View 6 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 2013 :: Copy Linetype Definition From Drawing To Linetype Definition File?

Nov 14, 2012

How can I copy a linetype definition from a drawing to the linetype definition file?

View 7 Replies View Related

AutoCad :: Parameters In Block Definition

Sep 10, 2013

I have a question regarding parameters in a block definition, or more specifically how to constrain parameters. I have attached a PDF showing exactly what I am working on. Basically I have an arm for a monitor which I need to add some parameters to. I need to be able to have a point that I can grab where the "primary grab" is located, and when I grab that I need the arm to pivot at the indicated pivot point, but be restrained by the first arm that is constrained to the circle. Is this possible to do in AutoCAD?

View 0 Replies View Related

AutoCAD .NET :: How Not To Show Blocks Name In Block Definition

Aug 16, 2011

Is there any way not to show a particular block in block definition table ? My program bring a  block into drawing  thru a user form . And set some Xdata to it after insertion . If user bring the block manually into drawing then how would we know  which one has xdata and which one doesn't. I came to this solution to hide it in block definition list.

View 4 Replies View Related

AutoCAD .NET :: Removing Objects From Block Definition?

Dec 21, 2011

I need to remove lines from a block definition and replace them with LWpolyLines. I see there is a way to Append entities to a BlockTAbleRecord but I don't see a way of removing an entity.

View 2 Replies View Related

AutoCAD .NET :: Copy Paste With New Block Definition

Sep 8, 2011

I'm trying to develop one tool with that objective:

View 9 Replies View Related

AutoCad :: Duplicate Definition Of Block GENAXEH Ignored

Feb 13, 2013

When I try to copy/paste I get this massage, "Duplicate definition of block GENAXEH ignored".

View 4 Replies View Related

AutoCad :: Moving Attribute Definition Within Block?

Dec 18, 2012

I am wondering what Block Authoring actions i can use to move my Attribute Definitions up and down in a Dynamic Block. I understand duplication the definitions can get really ugly.

So i want to be able to have a second visibility tab in my block the nwhen i select it my Attribute Definitons insertion point moves to another co-ordinate with in the block.

View 1 Replies View Related

AutoCad 3D :: Slicing In 3D To Create A Block Definition

Jul 4, 2013

How to do this so it doesn't ask for a block definition!

I have an extruded region of 50 x 50 (SHS) that I want to put a 45 degree mitre on, so I orientate my UCS to ortho, I have a reference line drawn over the job for my 45 degree/3 points to pick...

I Select 'both' to keep and it asks me for a block definition?

View 4 Replies View Related

AutoCad :: 1 Block Definition With Multiple Colours

Aug 16, 2012

Autocad 2012 full version

I have a large symbols library and need to have 1 block name and count but be able to show them in different colours depending on where they are placed. (eg pink block at low level and green at high level, but when counted by block name it counts 2 not 1 green 1 pink).

View 8 Replies View Related

AutoCAD .NET :: View Block Definition From External Program?

Aug 20, 2012

I need to view a block definition from an out-of-process app (written in C#).

The app uses True View Acctrl to as a viewer.

It works fine for whole dwgs, but when it comes to viewing just one block definition' the best I could come up with was:

<pseudo code>

start a new Autocad instance;

open the dwg in Autocad;

perform a Wblock of the block definition to some temporary file;

open and view the file in the Acctrl;

erase the temporary file;

</pseudo code>

It seems clumsy though.

Is there any API for doing this? (preferably not higher than Acad 2008)

View 4 Replies View Related

AutoCAD VB :: Updating Block Reference After Making Changes To Definition

Aug 23, 2013

I have a small vba sub wich changes the color and layer of all entities inside a block. It seems to work pretty well for the majority of blocks, but then if I try that on a dynamic block, the definition is correctly altered, but the references aren't updated...

I know for a fact that the definition has been correctly modified because if I type bedit, I can see the definition is modified. Then, in the block editor, if I save the block, the references are correctly updated.

How to force references to update after I made the modifications inside the definition ?

I searched for methods within the VBA Reference and I tried blockRef.Update but it doesn't seem to have any effect.

View 2 Replies View Related

AutoCAD .NET :: How To Mimic Block Definition Save As Function

Aug 30, 2012

How to mimic Block Definition Save As function.

So far what I have found in this forum and TheSwamp the best way is to use DeepClone of BlockTableRecord but the objects in original BlockTableRecord need to be DeepCloneObjectes into new block. Otherwise new block will have all objects  with ObjectId from old BlockTabkeRecord.

View 9 Replies View Related

AutoCad 2D :: How To Select Attributes To Include Them In A Block Definition

Dec 15, 2013

What order of operations do you use to include multiple attributes in a WBlock definition? I can't figure out to include all of attributes and have them in a specific order.

View 2 Replies View Related

AutoCAD .NET :: Assign Plotstyle To Attribute Definition In Block?

Nov 21, 2013

I am trying to assign a plotstyle to attribute while creating a block. First I create the block, then I insert the Blockref, in that process I have errors assigining a plotstyle to the attribute. (I have also tried to assign the plotstyle while creating the block and attribute with poor results.)

Here is my attempt to do this:

For Each objId As ObjectId In blkTblR
Dim obj As DBObject = objId.GetObject(OpenMode.ForRead)
If TypeOf obj Is AttributeDefinition Then

[Code].....

View 1 Replies View Related

AutoCad :: Creating Dynamic Block With Attribute Definition

Jun 10, 2013

I'm having trouble getting my attribute definitions to work with my blocks.

I'm trying to create a tag that can flip around (dynamic) and have a tag number easily entered (attribute).

I notice that I could only get the attribute definition to work during a drawing insertion is when I wblocked out my block and inserted that drawing file. I was not able to insert the drawing file that had the block in it.

I can't seem to make a dynamic block drawing file, and then insert that dynamic block drawing file if I want the attribute to work..

View 4 Replies View Related

AutoCAD Architecture :: Redefine Layers From Template File

Sep 13, 2013

I'm trying to set up a company layer structure and want to use LISP. Therefore I'd like to use a template file and set every layer with it's specific linetype and color there. If I change something in the template, say the color of a layer, it should update this in the drawing when I hit the LISP command.

View 9 Replies View Related

AutoCAD LT :: Tool Palette Block Definition Source Drawing

Oct 29, 2013

Is there a short cout to getting to the source drawing file containing block data? Drilling down into the Program Files folder is tedious in the heat of getting drawings done.

View 2 Replies View Related

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 :: Duplicate Definition Of Block ArchTick (Copy / Paste)

Apr 10, 2013

I've got a drawing from a client, I've created a layer and I'm adding MTEXT to the drawing. Rather than creating a new MTEXT every time, I copy and paste the previous one and edit.

It works for a bit then out of the blue, it will give me that error after there's about 16 copy/pastes.

_pasteclip Duplicate definition of block _ArchTick ignored.

I don't understand what _ArchTick is or how I can get around this error?

View 6 Replies View Related







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