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
ADVERTISEMENT
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
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
Dec 13, 2012
using AutoCAD 2009 (vanilla)
I got too smart for myself today in bringing an old drawing up to current standards...Everyone seems to want their block attributes to be zero - I have blocks where the attributes are best when they match the rotations of each blocks.
I have an old drawing that was rotated (as it should be) at approx 2deg.
I used a lisp routine to global edit all the blocks that needed to be at zero. BUT for some reason (and after hundreds of blocks were corrected), I noticed I now have two blocks that should NOT have been in the set have had their attributes rotated to zero....and the attributes should be at the same rotation as their block's rotation.
Because those two blocks have a fixed tic mark, I can click on the mark to see what the block rotation is, then rotate its attribute to that rotation, but I have hundreds of blocks! One-at-a-time sucks....
Any chance there is a GLOBAL way to edit an attribute rotation to match its own block's rotation?
View 2 Replies
View Related
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
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
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
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
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
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
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
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
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
Mar 8, 2012
Trying to make a rotateable block with non-rotating text (i.e. full-time "match orientation to view" text).
C3D2010
Win 7
Civil 3D 2012
Windows 7 Enterprise SP1
Dell Precision T3400
(Q9550 @ 2.83 GHz)
8GB RAM
Nvidia Quadro GTX 650 Ti BOOST
View 6 Replies
View Related
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
Feb 12, 2012
I need to match few attribute values from one block to different block. I download a lisp file called; ca.lsp which can match the single attribute value. I modified it for more than one attribute value matching. It is ok but still wish to overcome two issues for batch prcess
1. picking up the blocks by selection
2. click the alternative block numbers of times to match the numbers of attribute values I needed.
How to modify this lisp I can run it by block name selections instead of picking selection which enable me to run batch process for numbers of drawing? That will be good...
Lisp & Demo file attached (Match attribute value, A, B & C to Attribute 1, 2 & 3).
View 3 Replies
View Related
Apr 9, 2012
Can I change position of attributes depending on visibility states? I want to move existing attributes, not to add new and then hide it (maybe that is possible).
View 7 Replies
View Related
Feb 14, 2013
Is there a way to create a block with attributtes that automatically complete x, y, z, lat, long for the insertion point of the block?
I am trying to complete text in paperspace that will automatically fill in the lat long of a point in model space without using a table. I have tried field insertion with reference to a cogo point, but it doesn't give options for position on a cogo point. If I pick a block with attributes, it will let me pick any attributes, and x,y position for the block.
Cogo points show all the information I need to propagate in the properties....but how do I get that to translate into the text using fields or some other method?
Dell Precision T3600 - Windows 7 64-bit
NVIDIA Quadro 600
Intel(R) Xenon(R) CPU E5-1607 0 @ 3.00GHz 3.00GHz
8 GB ram - Two 1TB raid
View 9 Replies
View Related
Oct 26, 2012
When the block is in a drawing and I click it, it takes me to block editor.
However if I go to it in block editor and test block it allows me to change the attributes.
Why does clicking the block go to block editor and not allow me to change its attributes as it does when I test block.
View 9 Replies
View Related
Oct 31, 2013
I would like to change sub block from a visibility after setting it. Here an example of code to get the right visibility, I don't really know how to update a sub block by name or by handle(seems to change inside dynamic block).
Dim Block As AcadBlock
Dim BlockRef As AcadBlockReference
Dim DynEntBlock As AcadEntity
Dim DynObjRefH As IAcadBlockReference
[Code]........
View 9 Replies
View Related
Apr 8, 2013
I can insert a block with block attributes using the Inter op very easily:
Dim theBlock AsAcadBlockReference
Dim pickScreenVBA = myDoc.Utility.GetPoint(, "insert the hydrant")
theBlock = myDoc.ModelSpace.InsertBlock(pickScreenVBA, "Hydrant", 1.0#, 1.0#, 1.0#, 0)
Dim varAttributes AsObject
varAttributes = theBlock.GetAttributes
varAttributes(0).TextString ="3 Ports"
varAttributes(1).TextString ="Salt water"
Works great, but when I try using the non-inter op, all the example insert new Attributes and not add block with existing attribute (so I end up with duplicate attributes for each block - i.e "Salt water" attribute is added to the block each time I run the code),
Are they any examples that does the same as above using the non-interop code?
View 2 Replies
View Related
Dec 12, 2013
I'm trying to add some attributes to an existing block using the block editor, but after I save and close it I cannot see any 'placeholders' despite adding a default value and the attributes work fine when I double click the block.
I've tried using the ATTSYNC and BATTMAN commands but nothing works and there are no invisibility states applied to either the attribute or block and all layers are switched on.
I just tried making a quick block from scratch and it seems to have the same affect, except the default value will show, but no 'placeholder' shown if left blank.
I swear with previous version I could see the tag when a value hadn't been applied, so is it that the version I now use (2012) does not have this feature or it's disabled?
View 9 Replies
View Related
Sep 19, 2011
I'm trying to chnage the text of the sheet number and total sheet number attributes for each layout in my drawing. I have code that adds and deletes the specified pages, now I need to edit the attributes to reflect the correct page and correct total amount of pages. Here is my code, based on my old VBA version.
I know there is a problem with the line:
For Each item In myBTR.ObjectId
I've used a number of websites and books, but I would really like to find something that teaches about block tables, block table references, block table IDs so I can get a better understanding of breaking stuff down to get the info I need.
Public Sub updatePageNumbers()
Dim myDWG As Autodesk.AutoCAD.ApplicationServices.Document
Dim myDB As Autodesk.AutoCAD.DatabaseServices.Database
Dim myTransManForPageNumbers As Autodesk.AutoCAD.DatabaseServices.TransactionManager
Dim myTransForPageNumbers As Transaction
[Code]....
View 6 Replies
View Related
Jan 23, 2012
From the attached image you can see what I'm talking about.
(left=original, middle=ROTATE, right=PROPERTIES)
When I rotate blocks using ROTATE command everything is fine, but when I rotate blocks using PROPERTIES my attributes get messed.
I need to rotate several blocks at once with PROPERTIES, because I don't have time to rotate each one separately.
The same thing happens when scaling blocks, but this was resolved using the command BSCALE in the command line.
View 5 Replies
View Related
Nov 10, 2011
In AutoCAD it is possible to set the orientating of a block to the orientating of the layout.
This can be done to run the " block" command, select the block to change, and and activate " Annotative" and " Match block orientating to layout"
For example, you may want to have a block presenting the locating of an elevator automatically orientated to every layout.
In a layout with a rotated viewport by 90 degrees, all the elevator blocks are shown according the layout. Is it possible to set the block orientating to match the layout in .NET ?
Is it possible to set the block orientating to match the layout even the block is not annotative?
View 2 Replies
View Related
Feb 29, 2012
Function ReadDWG(ByVal DWGName As String)
Dim AcadApp As AcadApplication
Dim AcadDoc As AcadDocument
Dim Extracted_title As String RichTextBox1.AppendText(Path.GetFileName(DWGName)) RibbonLabel1.Text = "Opening AutoCAD"
[Code]...
I am using the above code to read block attributes depending on the name. But now I need to read the active drawing (drawing will be open and should read from the active document). In the above code I have referenced interop.dll. without that can I retrieve the block attributes. How to read the block attributes from the active document.
View 2 Replies
View Related
Jul 23, 2013
Basically, what I want to do is create a block, such as a piping elbow, that will allow me to click on different angles upon insertion and have it match that angle.
Assuming those gray dots represent the elbow block, which actions do I need to use in the block to have my elbow block match different angles as shown.
View 3 Replies
View Related
Jan 4, 2013
How to get attribute values to match in the same block? In my titleblock have the clients name displayed a couple of time in the block. I want to be able to change the clients name in one spot and have it change in the other. I have tried to use fields but the field will only display the default value of the attribute.
View 2 Replies
View Related
Aug 7, 2013
Using ACAD2014LT. I want to use the first variable attribute value as a variable in subsequent attributes in the same block. This will be extracted and used for tag references in a PLC program.
Along the line, i know I can change the enclosed character ( ' ), but can I remove it?
View 3 Replies
View Related
May 22, 2013
How Can I Get All Block Attributes and change it
View 9 Replies
View Related
Apr 24, 2013
I have this one file .txt with this features:
Point North East Z Description
1 8618063,68 312415,09 75,87 T1
2 8618138,38 312428,89 70,57 B_RIO SECO
3 8618132,23 312427,75 71,90 ARENAL
4 8618126,23 312426,64 72,50 ARENAL
5 8618112,22 312424,06 73,77 ARENAL
6 8618099,78 312421,76 75,35 ARENAL
7 8618089,51 312419,86 75,84 ARENAL
8 8618132,23 312427,75 71,94 J
9 8618112,23 312424,06 73,88 J
10 8618099,82 312421,78 75,36 ARENAL
11 8618089,48 312419,87 75,85 E_1
And I generated this code for read this file and insert one block with attributes for each line of text…..
If txtPath.Text() = "" Then
MsgBox("Select DB .txt.", MsgBoxStyle.Exclamation)
End If
On Error GoTo ControlErroresBD
Dim AcadDocPt As Document =
[Code] ....
‘To the end of this line I can insert the block,,,,,,, but I don’t know how to write the attributes…… I tried with the next code but it doesn’t work…. My bloque has 3 attributes and every tag named with “PN”, “CD” and “CT”
Dim AcadObj As Entity
For Each acObjId As ObjectId In AcadBlockRef.AttributeCollection
AcadObj = AcadTransPt.GetObject(acObjId, OpenMode.ForWrite)
Dim acAttDef As AttributeDefinition = TryCast(AcadObj, AttributeDefinition)
[Code] .....
View 9 Replies
View Related