You are currently reviewing an older revision of this page.
Background Information
Property data by specifications contain values that should not be displayed in a drawing, or it should generally make all technical data of certain cells disappear.
Steps
Below is an example in which all property data is hidden in cells which were selected in advance.
The example examines only the previously selected cells or dummy cells on the .GetSelected method from the attribute .IsHidden = True.
The number of attribute data is counted and displayed in the message center at the end. If nothing is selected a message will appear.
Sub
TagsSelOff()
Dim
Ee
As
ElementEnumerator
found
Boolean
otags()
TagElement
count
Long
count = 0
Set
Ee = ActiveModelReference.GetSelectedElements
Do
While
Ee.MoveNext
found =
True
If
Ee.Current.IsCellElement
Or
Ee.Current.IsSharedCellElement
Then
Ee.Current.HasAnyTags
otags = Ee.Current.GetTags
For
i = LBound(otags)
To
UBound(otags)
otags(i).IsHidden =
False
count = count + 1
otags(i).Rewrite
End
Next
Loop
Not
MessageCenter.AddMessage
"No elected Members"
, , msdMessageCenterPriorityError
Else
"There were "
+ str(count) +
" pieces of attribute data removed"
, , msdMessageCenterPriorityInfo
See Also
Searching and Evaluating Data in a drawing with VBA Part 10 - Reading Attribute Data