Hallo,
I'm trying as follow to modify block attribute property using thevisual basic API.
I can successfully run the code. But doing so does not changethe Attribute.
What am I missing?
Thx a lot for helpingSolidworksApi macros
I'm trying as follow to modify block attribute property using thevisual basic API.
Dim m_blk As DWGeditor.Block
Dim i As Integer
For Each m_blk In ActiveDocument.Blocks
If "Block_Name" = m_blk.Name Then
For i = 1 To m_blk.count
Dim m_obj As Object
Set m_obj = m_blk.Item(i)
If m_blk.Item(i).EntityType = vicAttributeDef Then
If m_blk.Item(i).TagString = "ToMatchTag" then
m_obj.TextString = "Edited Text String"
m_obj.Update
m_blk.Reload
End if
End If
Set m_obj = Nothing
Next
End If
Next
ActiveDocument.Save
What am I missing?
Thx a lot for helpingSolidworksApi macros