Inventor iLogic to edit existing Autocad Block Attributes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone, Its been a while.
Lately we've been required to supply drawings to a major costumer in Autocad dwg format and comply with their drawing standards. This has become part of the job.
I am trying to automate this process and I'm caught up with editing the attribute values of the autocad blocks using inventor ilogic.
I can insert an autocad block and edit its attributes at the same time but that requires that every attribute value is defined within the code. For a view label this is OK, there are only 2 attributes, but for a titleblock there are just too many (this one in particular has 111).
So to my question is how do i select the last placed block and
1. open up the attribute editor? (as if i were to place it manually or right lock on the autocad block and select edit attributes)
and
2. select a single attribute and write a value to it?
here is the code I have so far
' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument : oDrawDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet : oSheet = oDrawDoc.ActiveSheet Dim oTG As TransientGeometry: oTG = ThisApplication.TransientGeometry Dim oBlockDef As AutoCADBlockDefinition : oBlockDef = oDrawDoc.AutoCADBlockDefinitions.Item("700-900-DC-TEM-0004_4 (A1)") Dim oAutoCADBlock As AutoCADBlock : oAutoCADBlock = oSheet.AutoCADBlocks.Add(oBlockDef, oTG.CreatePoint2d(0, 0), 0, 1)