Message 1 of 9
Modifying block attributes without using GetAttributes

Not applicable
09-17-2008
06:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I am trying to modify the attributes of a specific block inserted into my
drawing.
I have specific reasons for not wanting to loop through the modelspace for
the correct block-element, and not using GetAttributes to receive an array
of all attributes and so on.(I am using OLE Automation from an external
application to remotly change blockattributes inside a drawing),
So my question is; Is it possible to modify attributes using the syntax
below?
ThisDrawing.Blocks(1).Item(1).TextString = "TEST"
This syntax works, I am able to write "TEST" into the specific items
TextString. But, the drawing is not updated.
Also, If I edit the drawing and change the blockattribute-values using
DDEDIT, I cannot read these changes from VBA using
ThisDrawing.Blocks(1).Item(1).TextString. It will only display blanks.
Am I missing something here? Is the blockattribute-values accessed through
DDEDIT different than the ones accessed through
ThisDrawing.Blocks(1).Item(1).TextString?
regards,
Bjørn Holm
DASH Software AS
Norway
I am trying to modify the attributes of a specific block inserted into my
drawing.
I have specific reasons for not wanting to loop through the modelspace for
the correct block-element, and not using GetAttributes to receive an array
of all attributes and so on.(I am using OLE Automation from an external
application to remotly change blockattributes inside a drawing),
So my question is; Is it possible to modify attributes using the syntax
below?
ThisDrawing.Blocks(1).Item(1).TextString = "TEST"
This syntax works, I am able to write "TEST" into the specific items
TextString. But, the drawing is not updated.
Also, If I edit the drawing and change the blockattribute-values using
DDEDIT, I cannot read these changes from VBA using
ThisDrawing.Blocks(1).Item(1).TextString. It will only display blanks.
Am I missing something here? Is the blockattribute-values accessed through
DDEDIT different than the ones accessed through
ThisDrawing.Blocks(1).Item(1).TextString?
regards,
Bjørn Holm
DASH Software AS
Norway