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


ADVERTISEMENT

AutoCad :: Position Of Attributes On Block Match Position On Another Block

May 15, 2013

Is there an easy way to ensure that the position of attributes on a block match the position on another block?

I just used the ATTIN command to upload a bunch of data to the block attributes on a drawing, and now the information is all over the place.

Instead of going through each one manually and repositioning the attributes (a VERY lengthy process), I want to use a "correct" version as a template of sorts to inform the other selected blocks of where to place the attributes and have it reposition the whole thing automatically.

Is this even possible?

View 6 Replies View Related

AutoCAD 2010 :: Force Attribute Position To Remain Fixed In Drawing When Moving Block Position

Jul 12, 2013

Is it possible to setup a block so that an attribute position remaines fixed (absolute to drawing) when moving the block?

I've been playing around with creating a Coordinate Block by following these instructions: [URL] ........

What I would like is to be able to set the position of the Coordinate Label and Coordinate Object independently, so that if I move one in the drawing, it doesn't move the other.  I've looked into Dynamic Blocks, and the "Lock Position" parameter. I can move the attribute independently, but still everytime I move the block, the attribute moves too.

Our company uses a custom Sheet/Coordinate system to follow flyoffs across a drawing, and I'm trying to learn how to automate the process.  It's completely manually right now, so any changes to a drawing creates a lot of work renumbering these flyoffs.

View 4 Replies View Related

AutoCAD .NET :: Insert Dynamic Block And Position And Stretch The Block?

Apr 6, 2013

I am trying to insert a dynamic block and position and stretch the block, using the linear parameters, depending on values entered into a form.

I managed to create a form that would draw a series of boxes. And i managed to create a routine that would insert a block and size it depending on fixed values but i can't link the 2 together.

Win 7 Pro 64bit, Dell Precision M6500

View 8 Replies View Related

AutoCAD Inventor :: Camera Pivot Changing Position Alone - No Control?

Aug 23, 2013

For some reason, the camera pivot has changed..Whenever I set it to anything, it keeps going back to the stupid configuration of being 5 meters away from my plot... which means the slightest rotation makes me lose the view.

I tried using the navigation the navigation wheel's "center", but it sets it in two dimensions of the projection's plot on my screen, which is not enough.

And I tried the command alias "3DO", but every time I do it, it works only once... and for some reason the camera pivot gets lost again on the next move.

how to change the camera pivot position by entering it somewhere like (0,0,0).

View 2 Replies View Related

AutoCAD .NET :: Position A Block In Paperspace?

Nov 23, 2011

I've worked on a command that automatically imports a dwg into paperspace and positions it. I've just realized that when imported vertically, the titleblock is on the wrong side of the layout. I've imported it to (10,10,0) and would like to import to those exact opposite co-ordinates to essentially flip it but i'm a bit unclear as to how. I know that I can use the commands  Database.PextMax  and Database.PextMin to determine the max and min points of the primary layout, but what co-ordinates are these, are they the top right corner and bottom right corner. 

For what it's worth, here's my routine:

string dwgName = HostApplicationServices.Current.FindFile(comp, acadApp.DocumentManager.MdiActiveDocument.Database, FindFileHint.Default);
Database db1 = new Database(false, false);
db1.ReadDwgFile(dwgName, System.IO.FileShare.Read, true, "");
ObjectId BlkId;
BlkId = doc.Database.Insert(dwgName, db1, false);
BlockTable bt = (BlockTable)tr.GetObject(doc.Database.BlockTableId, OpenMode.ForRead, true);

[code]....

View 9 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 .NET :: Retrieve Block And Its Position From DWG File

Jul 1, 2013

How can I retrieve a block from DWG file using Objectarx SDK.Lets say I have a cinema hall design with a lot of chairs and I am using a blcok named chair to design it. Now I want to retrive this blocks and their positions. Is it possible?

View 5 Replies View Related

AutoCAD Inventor :: Custom Title Block Position?

Jun 19, 2012

I have created a custom title block and border for one of the automotive manufacturers since I need to submit all their drawings in the standard border and title block format. The border is quite broad, so when I insert the new title block, it overlaps the border slightly. I need to try and find the setting to control the exact point at which the title block is positioned when inserted into a drawing.

Windows 7 Pro (X64)
Intel(R) core (TM) i7-2600 CPU @ 3.40GHz
16.0 GB RAM
Nvidia Quadro 600
Autodesk Inventor 2013 Professional Ultimate Design Suite

View 4 Replies View Related

CorelDRAW X5 :: H And V Position Changing

Aug 9, 2011

CorelDrawX5-PositionBug.gi...

I am running CorelDraw version 15.2.0.686 with Service Pack 1.

I need to position graphics in exact locations and using the Transformation Position window, especially with Nudge and Super Nudge, is very useful. However, when I zoom in or out, go to another page of the document and back again, or close and re-open the file, many times the H and/or V coordinates shown in the Position window will have changed by one or two units (sometimes more). I can change them back to the correct coordinates but they will change again, and not necessarily by the same amount, when doing any of the actions I mentioned.

It's not that big of an issue when I know the location ends in either a 0 or a 5 and I can move it back to the correct location, but there are times when the graphics are not on a round number and I don't know if it correct or not.

This has been a bug in many versions of Corel (I have been a CorelDraw user since the beginning), but it is happening with every file I work on in X5.

View 5 Replies View Related

AutoCAD .NET :: Nested Block Position In Model / Paper Space

Feb 7, 2013

BlockTableRecord.Position gets the position of the block in its owner. So if it is a nested block, it gets the position inside the parent block.

I want to get the position of a nested block in the space (model or paper). One way of doing this is getting the location of that parent, and if the parent is also nested, get that position and so on...and then calculate the position of the nested block.

View 3 Replies View Related

AutoCAD Inventor :: Locating Title Block In Correct Position

Aug 21, 2012

I am currently updating a title block and it will be wider than the original.  This is going to cause me to move the block.

How do I get it constrained  back into the lower right hand corner?  I wouldnt think this would be this difficult of a thing to accomplish.

View 1 Replies View Related

AutoCAD .NET :: Creating Xline From Block Reference Position In Custom UCS

Mar 14, 2013

i'm looking to select a block reference, take it's wcs position, translate the coordinates to the current ucs and then create an xline using those translated coordinates. simple, right? 

i simplified some code to test that i could properly build an xline in a current ucs. i just threw in static point3d values instead of grabbing them from another object. it worked as expected:
 
<CommandMethod("test")> _ Public Sub test() 'get the active document, editor and database Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument Dim acDocEd As Editor = acDoc.Editor Dim acCurDb As Database = acDoc.Database 'start a transaction Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction() 'open the table for read Dim acBlkTbl As BlockTable acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead) 'open the record for write Dim acBlkTblRec As BlockTableRecord acBlkTblRec =

[code]...

here, i revised the code so that a block reference's objectid is passed from another procedure, the origin is determined, translated to the current ucs and the points are tailored for the xline's basepoint and secondpoint. i threw in a few writemessages to ensure that the coordinates were indeed what i was looking for and they match up, but for some reason, the xline now fails to create itself.
 
'define the current ucs Dim ucsDesign As Matrix3d = acDocEd.CurrentUserCoordinateSystem 'start a transaction Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction() 'open the connector block for read Dim acBlock As BlockReference = acTrans.GetObject(idConnector, OpenMode.ForRead) 'save connector origin Dim ptOrigin As Point3d = acBlock.Position 'translate the point to the current ucs Dim ptUcsOrigin As Point3d = ptOrigin.TransformBy(ucsDesign.Inverse) 'show me the block position acDocEd.WriteMessage(vbLf & ptOrigin.ToString()) acDocEd.WriteMessage(vbLf & ptUcsOrigin.ToString()) 'open the table for read Dim acBlkTbl As BlockTable acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead) 'open

[code]...

i've rearranged this code multiple times, tried a couple different approaches, scoured the forums and even resorted to the less-than-elegant:

'create the xline Dim cmdString As String = "._xline " & ptUcsOrigin.X & "," & ptUcsOrigin.Y & "," & ptUcsOrigin.Z & " " & ptUcsOrigin.X & "," & ptUcsOrigin.Y + 1.0 & "," & ptUcsOrigin.Z & " " acDoc.SendStringToExecute(cmdString, True, False, False)

 but i need to use the xline object after i've created it, so this sendstringtoexecute crap won't work. 

View 7 Replies View Related

AutoCad :: How To Justify All Text Inside Of Block To Right Without Retaining Position

May 17, 2013

I am trying to align all of the text inside of a block and have it actually align the text instead of having it keep it original position (like when you use "Justifytext" command). For example: We use blocks for fire alarm devices that we insert into drawings. When the devices are inserted they look like this (Middle left):

15CD
TBD
TBD
1/4W

I can double click each line of these texts, have the eattedit window pop up, go to "text options" tab, click the drop down menu for "Justification:" and then choose my justification(middle right); then the text will actually move to align itself with my justification, causing my text to end up like this:

15CD
..TBD (Roughly like this, only perfectly straight vertically on the right hand side)
..TBD (ignore the dots, i had to insert them for the spacing to be correct for
1/4W this example)

When I type "Justifytext", select my block, choose my justification (Middle right), just the snap point moves to that justification without the text actually moving at all, causing my text to end up like this:

15CD
TBD
TBD
1/4W

View 9 Replies View Related

AutoCAD .NET :: Nested Block Position In Model / Paper Space?

May 31, 2013

I need to gather objects on a specivied layername within model_space in C#.

How do I add a fileter to my filtervalues to only grab model_space objects.

TypedValue
[] filterValues = new[] { newTypedValue((int)DxfCode.LayerName, LayerName.ToUpper()) };

[Code]....

View 9 Replies View Related

3ds Max Modeling :: Changing Position Of Objects Towards Center

Jan 27, 2014

How to change position of several objects toward center (let's say all objects have pivot point in one place) ?

View 4 Replies View Related

AutoCAD Civil 3D :: Dynamic Block - Unable To Get Text Orientate To Horizontal Position In Viewports

Jul 10, 2012

I made a simple block for a utility pole in plan view. It consisted of a donut with one string of mtext beside it. I had  created it so that the text would orientate itself to be horizontal in each viewport regardless of the ucs angle. I later added a line for a guy wire and made the block dynamic with visibility states. Now I am unable to have the text orientate to a horizontal position in the viewports.

View 8 Replies View Related

AutoCAD VB :: Converting AttributeDefinition Objects To Text Objects On Same Layer

May 9, 2013

I have several .dwg files that I use as templates. I run find and replace VBA routines on the template .dwg files, ie find $Flavor$ and replace it with "Grape", and then I save the .dwg to another directory with a new name. 

These VBA routines work well for acdbText and acdbMText objects, but I have a bunch of AcdbAttributeDefinition objects in the .dwg templates as well.

After much research about the AutoCAD object model (I'm mostly a Microsoft Access VBA programmer), I have come to understand that these AcdbAttributeDefinition objects are actually "remnants" of a block that no longer exists in the drawing.

Anyway, I'd like to convert all of these orphaned AcdbAttributeDefinition objects to acdbText objects in the templates and then delete the AcdbAttributeDefinition objects. I have some code that does just that.

However, the issue that I am having with the code is that the newly created acdbText objects are not on the same layer that the original AcdbAttributeDefinition objects were on. I don't know the syntax to identify what layer the AcdbAttributeDefinition object is on or how to specify what layer on which the acdbText object is created.

how to keep the acdbText objects on the same layers as the original AcdbAttributeDefinition objects during the conversion and deletion process?

Here is the code I am using currently:

Sub AttConvert(dwg as string)Dim oDocument as AcadDocumentDim ent as AcadEntityDim aa as objectset oDocument = Documents.open(dwg) For Each ent In oDocument.ModelSpace If ent.ObjectName = "AcDbAttributeDefinition" Then' DO SOMETHING TO IDENTIFY WHAT LAYER THE ACDBATTRIBUTEDEFINITION OBJECT IS ON
' DO SOMETHING TO SPECIFY THAT THAT IS THE LAYER TO CREATE THE ACDBTEXT OBJECT ON Set aa = ThisDrawing.ModelSpace.AddText(ent.TagString, ent.InsertionPoint, ent.Height) End If Next ent For Each ent In ThisDrawing.ModelSpace If ent.ObjectName = "AcDbAttributeDefinition" Then ent.Delete End If Next ent End Sub

View 1 Replies View Related

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







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