AutoCAD .NET :: Changing Block Name

Aug 11, 2011

Is it possible to edit a block name?  I am trying to nam the block to JIM like this...

BlkId = doc.Database.Insert(dwgName, db, true);
BlockTable bt = (BlockTable)tr.GetObject(doc.Database.BlockTableId, OpenMode.ForRead, true);
BlockTableRecord btr = (BlockTableRecord)tr.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
BlockReference bref = new BlockReference(new Autodesk.AutoCAD.Geometry.Point3d(0, 0, 0), BlkId);
bref.BlockName = "JIM";

I am getting an error:

"Autodesk.AutoCAD.DatabaseServices.Entity.BlockName' cannot be assigned to -- it is read only"

View 3 Replies


ADVERTISEMENT

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 2D :: Inserting Block Changing UCS

Oct 4, 2013

Every time I insert a block (dynamic or otherwise) into any drawing (I have tried several) my ucs (0,0) changes to the insertion point of that new block. I don't know what I have done, what button I have inadvertently pushed or setting that I have set, but I do not know how to undo this!

Iam using AutoCAD 2014.

View 3 Replies View Related

AutoCad 2D :: Block Color Not Changing

Jun 20, 2012

I have a block. All work inside the block is set to layer 0 and color properties are set to 'By Layer'.

When I try to give the block a custom color in model space, e.g. 251, the block remains the same color as the layer color. I have been able to change block colors in this way before.

View 1 Replies View Related

AutoCAD .NET :: Changing Position Of AttributeDefinition In A Block?

Dec 18, 2012

I am trying to change the position of an AttributeDefinition in a block, but it nothing is changed:

foreach (ObjectId oidAttribute in btrBlock){ adOrg = taTransaction.GetObject(oidAttribute, OpenMode.ForRead) as AttributeDefinition; if (adOrg != null) { adOrg.UpgradeOpen(); adOrg.Position = new Point3d(0, 0, 0); // Break; break; } adOrg = null;}
...
Commit();

How do I change the position?

View 4 Replies View Related

AutoCAD .NET :: Dynamic Block Manipulation After Changing UCS

May 28, 2013

The dynamic position and angle parameters within the inserted blocks appear to be based on the UCS at the time of insertion and relative to the basepoint of the block. These positions don’t change if the UCS is changed or block is rotated.

I can’t work out how to modify the position parameters if the UCS is not the same as that used when the block was inserted. How I access these positions after changing the UCS?

I’ve tried looking at the ECS of the block reference but I’m not sure if that’s what I need to be using.

View 3 Replies View Related

AutoCAD .NET :: Dynamic Block Not Changing State

Sep 6, 2011

I have created a bunch of templates (title block type drawings) for my company.  In these templates there is a dynamic block used for a particular note.  Based on customer number, this note will be changed.

We have a program that will insert the correct template based on the drawing type.  It will know the customer number and change the dynamic block visibility state to reflect the correct text in the note.

I don't know why, but sometimes the visibility state does not change.  It's not the code as in some drawings it works just fine.  I've gone in and just changed the visibility state name, then changed it back, then saved the drawing and it worked.

Has trouble with dynamic block visibility states not working when using an automated process?

View 3 Replies View Related

AutoCAD 2010 :: Changing Block Names?

Mar 23, 2011

Is it possible to edit a block name?  The alternate solution is to create a new block (door) to accurate describe sizing/ type and copy to and delete old blocks w/ innacurate names.  Because of the high number of doors, the alternate solution would take much longer. 

View 9 Replies View Related

AutoCad :: Changing Company Name In Title Block

Jul 26, 2012

Been working with Auto Cad for a while, but using the same tittle block that was created by someone else.

The tittle block seems to be made up of some text lines (which is the area I want to modify), but tied to several 'attributes' below the text, project, drawing number etc.

The only way I can access the text is to 'explode' the whole area (block?), I can then modify the text, but in doing so the several attributes function individually, and not as a whole block.

How do I 'un-explode' the area?

View 3 Replies View Related

AutoCad 2D :: Changing Dynamic Block Colours?

Sep 4, 2013

I have a dynamic block and want to change its colour. I've gone into blockedit and made the change there however when I return to the drawing the colours haven't altered.

View 3 Replies View Related

AutoCad :: Changing Text Properties In Block?

Jul 4, 2013

I have a title block saved in my template file, and also as a block in the design centre. The variable fields within the title block are in Arial font. If I open each title block and fill them in I have no problem. If I take the shortcut of filling in one and copy and paste from one sheet into the next sheet, the text properties change back to standard.

View 2 Replies View Related

AutoCad 2D :: Changing All Colors In Drawing Regardless Of Layer Block

Feb 20, 2012

I want to change the color of everything in my drawing except for 3 layers. There are hundreds of layers and blocks in this drawing, even after purging. I want to avoid just exploding everything and putting it on one layer.

I want to change everything to grey except for the 3 layers I'm working in. I'm using ACAD LT so I can't create a script to do the job. The only thing I can think of is going into the layer properties window and selecting each layer and changing the color one at a time.

View 9 Replies View Related

AutoCAD .NET :: Slowing Down When Changing Block Reference Property Values

Sep 30, 2013

I'm inserting automatically many references to a couple of dynamic blocks in an AutoCAD drawing using VB.NET. If the number of inserted references is not very big, it works fine but, if I´m inserting hundreds of them, I noticed the app is slowing down a lot.

After taking some measures of the time the app uses in its execution, I noticed changing the value of the block reference property is slower as the number of inserted block increases: it takes 10 or 20 miliseconds at the begining but it can take more than 1 second after inserting one thousand of block references (to the same block).This is the function I use to change the property values:

Protected Sub CambiarPropiedades(ByRef ed As Editor, _ ByRef br As BlockReference, _ByVal nombrePropiedad As String, _ ByVal valor As Double) Dim pc As DynamicBlockReferencePropertyCollection = br.DynamicBlockReferencePropertyCollection If br IsNot Nothing And br.IsDynamicBlock Then For Each prop As DynamicBlockReferenceProperty In pc If prop.PropertyName = nombrePropiedad Then prop.Value = valor '

This line takes a long time the first time I call this function for the ' same block reference but it is faster in the next calls . It also changes the block reference name (br.name) in the first call

Exit For End If Next End If End Sub.

Which I call to change all the properties I need to change in an inserted block reference:

CambiarPropiedades(ed, br, "h_testua", objElementoLaboratorio.POS_TEXTO) CambiarPropiedades(ed, br, "d_texto_hor", posxTexto) CambiarPropiedades(ed, br, "largo", objElementoLaboratorio.LARGO) CambiarPropiedades(ed, br, "fondo", objElementoLaboratorio.FONDO)
 A weird thing I noticed is that when I call this function to change the first property of an inserted block, it also changes the .Name of the block reference.

Even if I change the order in the property modification, it takes always a lot in the first call, it does not depend on the property I´m changing.

View 1 Replies View Related

AutoCad :: Changing Entity On Single Instance Of Defined Block

Jun 8, 2012

A defined block "DH" has:

A circle on layer CIR having a color of red...
A defined attribute on layer ATTR having a color of white...
The insertion point is the center of the circle...

Is it possible to change the circle to blue on one instance of the block without affecting the same change to other identical blocks in the drawing? Example:

Attachment 35286

View 2 Replies View Related

AutoCad :: Edit Block In Place (refedit) Without Changing Globally?

Mar 28, 2013

Can you edit a block in place (refedit) without changing globally and without exploding within that drawing?

View 6 Replies View Related

AutoCAD LT :: Changing Attribute And Lost Imperial Door Dynamic Block?

Jul 30, 2013

I was trying to change an attribute and lost the "imperial door" dynamic block.  I do not know where to find the original and replace it in the tool palette.

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 :: Changing Text In Attributed Block

Dec 21, 2012

I am trying to speed up some basic drafting of text revisions. In the P (plumbing) we call out the fixture units for a water pipe, along with the fixture units, the pipe size changes.
 
Is there any way to add numbers in an attributed block? (I have a lisp that works on text & mtext, but not attributes)

1.1. Example: Like if you have a block with two attributed text fields, the 1st field {x} is a number (fixture unit), and the 2nd field {y} is a number (pipe size).  I would want it to only add the 1st text fields. [If possible then change the 2nd text field according to a changeable chart. (see #2)]

1.1.1.   This is how the block looks like: x (y")
1.1.1.1.   x could be any number from 0.5 – 10,000 (only using 1 decimal place, and only as needed)
1.1.1.2.   y could be any number from the following list: ½, ¾, 1, 1¼, 1½, 2, 2½, 3, 3½, 4, 5, 6
 
Is there a way like in excel that you can set up a formula that will give a numerical result depending on other input? Like pipe size that change depending on the number of fixtures. There would need to be two different formula, one for hot and one for cold values (The value would be set at the beginning of the job; typically these values would not change later in the job). This could be separate text or if possible using the attributed block as described in #1.

2.1.    Example: Like if you have a block with two attributed text fields, the 1st field {x} is a number (fixture unit), and the 2nd field {y} is a number (pipe size).  I would want it to change the 2nd text fields according to the value in the 1st text field. If the value in {x} is 0.5 – 1.0, it would result in ½; 1.5 – 7.0 = ¾; 7.5 - 17 = 1; 17.5 – 36 = 1¼; ect.

2.2.    In excel it would be =IF(x)<1,"1/2",IF(x)<7,"3/4”,IF(x)<17,"1",…{all #’s in between} …IF(x)>5000,"6")))))

View 9 Replies View Related

AutoCAD .NET :: Changing Distance Parameter In Dynamic Block Doesn't Move Attached Attributes

Aug 28, 2011

 I have this Dynamic Block which has a few  distance parameters on it and  an attribute at beginning of each parameter which are attached to a stretch action. If   manually bring the block in. And  set a value to attribute and then stretch the it , attribute move along with action. But when I do it pragmatically it doesn't . Basically attribute stays at original location of original block before stretch. What is wrong with my code. Or Shall I do something to Attributes when I change the distance parameters in Program? I don't know .

I have a function which bring the block in and set attribute first and then another call which change the distance . So I don't show the first function which to me works fine . The problem is this part.

For Each myBRP As DynamicBlockReferenceProperty In myBRC
For I = 1 To NumbderOfDistanceParamsinDynBlk
If myBRP.PropertyName = "Distance" & Trim(i.ToString) Then
myBRP.Value = DynDistancevalue(i)
End If
Next
Next

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change All Block Element To Layer 0 Without Changing Color / Linetype

Sep 3, 2013

I have too many blocks with specific layers inside.

develope lisp can change all to layer 0 but keep color and linetype as it is.

I will use this as a part of script to change multiple block.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Attribute Height Is Changing Each Time Routine Is Run With An Annotative Block

Apr 30, 2012

I only do programming when absolutely needed so it usually only happens every couple years. I wrote this routine to count nested blocks inside of dynamic blocks to count parking spaces. The routine worked fine but was relying on the ltscale to scale a block containing an attribute for the total number of spaces. I want to update the routine to use an annotative block so the scale doesn't have to be set. I changed my block containing the attribute but now when I run my routine, the attribute height gets changed each time the routine is run. The text just gets larger and larger. Here is the portion of the routine where the attribute info is gathered and updated with the new value for that attribute. If you need the entire routine, I can post it with a slight modification so it will work outside our network.

(defun updateattrib ()
(setq CNT 0) ; sets count to 0
(while (< CNT (sslength ss)) ; starts loop while CNT is less than the number of objects in the group

[Code].....

I am running this in Civil 3D 2010 but will want it to work in 2013 so if the solution will only work in 2013, that is fine with me.

View 3 Replies View Related

AutoCAD Inventor :: Title Block - Assign Static Sheet Letter And Changing Page Number

Nov 7, 2011

Standard sheet number option gives you only 1, 2 and so on.

I want A1 where A does not change and 1 changes depending on sheet number.

View 1 Replies View Related

Revit :: Changing Title Block For A Sheet From One Family To Another?

Mar 13, 2012

I have a Revit project with two different types of title blocks - one for Planning Board Submissions and one for Construction Documents.  Is there a way of changing the title block family for a sheet from one family to another?  I cannot seem to be able to do this without deleting the sheet and re-creating it with the new title block family.
 
I cannot just edit the family and reload it because, like I said, I need to maintain certain information on some sheets and different information on others.

View 5 Replies View Related

AutoCAD Dynamic Blocks :: Insertion Point Of Attribute Changing Within Dynamic Block

Nov 21, 2011

I wish to create a dynamic block containing some attributes. These attributes are inside rectangles that can't be modified in length using linear parameters ; but the attribute has to be always in the middle of the rectangle. So, I draw a line inside the rectangle (in a hidden layer) and insert the attribute with center justification (not sure for the translation) that I place in the middle of this line ; then I put a coincidence constraint (not sure for the translation, but it's the first one) linking the middle of the line with the middle of the attribute.

But here's the problem : when stretching my rectangle, the insertion point of the attribute suddenly changes from "center" to "bottom left".

View 2 Replies View Related

AutoCAD Inventor :: Retaining Title Block Prompted Entries When Changing Title Blocks

Apr 26, 2013

The title blocks that we use have prompted entries in them and I would like to find a way using iLogic to copy the entries from one title block to another within the same drawing; i.e.. if the user decides to change from an A2 to A1 drawing.

I already have an iLogic rule which allows the user to change the active border, title block and sheet size based on a form selection but would like it to capture the prompted entries already entered and re-use them after the change.

View 9 Replies View Related

AutoCAD Inventor :: Changing Extrusion By Changing Sketch Results In Errors

May 9, 2013

The attached files are two sprockets. The original part has 30 teeth. I need 34 teeth.

The MODIFIED part has one of my attempts at making 34 teeth. I have tried the following with the same error dialog box (see below):

1. Edit Sketch_6 (associated with Extrusion1) by deleting all but one of the teeth lines (2 arcs and 2 lines that make up a tooth) and making a circular pattern of 34.

2. Same circular pattern, except this time I "Close the Loop" (right-click on one of the teeth line segments > Close Loop > click on all the segments until the loop is closed).

3. Same circular pattern, except this time change the resulting patterned lines into construction lines, trace these lines with arcs and lines of my own (not construction lines), and close the loop on my own lines.

When each of the 3 attempts failed, I tried deleting Extrusion1 and making a new Extrusion feature from Sketch_6. I cannot select what I want in Sketch_6 in order to make the teeth.

I'm at the point where I'm just going to take the dimensions from the circular pattern sketch of 34 teeth, delete Extrusion1 and Sketch_6, and make my own sketch and extrusion.

For the future, I really would like to know - why is it so difficult to alter features like this? Yes, I understand that Sketch_6 is not fully constrained, and on top of this I am not privy to how it was generated in the first place (this is a part file from a vendor). But it does not strike me as something overly complicated for the Extrusion feature to recognize a change in its associated sketch. This is not the first time I have encountered something like this.

View 1 Replies View Related

AutoCAD 2013 :: Updating Block References Resets Block Table Selections?

Sep 4, 2012

We use a number of blocks with block tables for data extraction here, and whenever one of the blocks is modified and updated, all of the block tables reset to the default value. This happens for any block reference change, not just changes to the block table (which makes sense that it would reset).

How can we update these blocks without having to manually change all of the block tables afterwards?

View 2 Replies View Related

AutoCAD 2013 :: Dynamic Block In Action Doesn't Reflect Test Block

Jan 24, 2013

I am in the process of fixing one of our dynamic blocks. It's a fairly simple fix where there was a typo in one of the names of our items in the lookup that needed to be fixed.

I changed the name of the item in the lookup table. I went and did the test block and it seemed to work fine, but when I bring the block into a drawing, it reverts back to the old lookup as if I did nothing at all.

I made sure that the path was correct and I even just dragged and dropped straight from Windows Explorer to no avail.Does AutoCAD keep referring to the old block? Did I forget to change something else?

View 3 Replies View Related

AutoCAD Architecture :: Explode Destroys The Small Block Inside Bigger Block?

May 30, 2012

I have a block containing several parts blocks. When I explode the main block all of the parts are exploded back to lines. I have used both "explode" and "xplode" and have the same results.  How can I explode so I have my components as blocks?

View 6 Replies View Related

AutoCAD Civil 3D :: Inserting A Block Deletes Points With Point Style With Same Block

Oct 16, 2013

We're using C3D 2013 SP2.  The survey company we use uses point styles to show the blocks.  Say they shoot a catchbasin.  Instead of inserting the block, the point shows up as the block.

I did a field check & needed to insert a missed CB.  When I inserted the block, the other points that were CBs disappeared.  I had to insert the block, copy it the clipboard, undo the insertion & then paste the block in.  It did this on other drawings & other blocks.

View 7 Replies View Related

AutoCAD 2010 :: Inserting New Block And Entering Attribute Data By Selecting Another Block?

Aug 13, 2012

Is it possible, via whatever methods (lisp?) to be able to have a premade block with an attribute and insert it into a drawing then assign a value to it by selecting another existing block in the drawing and using one of its own attribute’s values?

For example, say I have a block representing a telephone and it had an attribute called "PhoneNo" and I inserted it into a drawing showing an office floor plan that had blocks in each office space that are telephone junction boxes with attributes "PhoneExtension".  I would like to be able to autocomplete the entering of the “PhoneNo” data by selecting one of the telephone junction boxes in the drawing and using its attribute’s value.

View 5 Replies View Related







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