Hi everybody
I'm writing a new macro to check texts in drawings.
I want to get the visualproperties of each text of each distinc view of each distinct drawingsheet
And so far the only way of doing this was using selection.add but it's sooooooo long that I need your help to find a better way of doing it
i've been trying to use :
to iteratively get the visual property of each element of the selection but it didn't work
the workking code goes something like this
Thank you for the help
jissi
I'm writing a new macro to check texts in drawings.
I want to get the visualproperties of each text of each distinc view of each distinct drawingsheet
And so far the only way of doing this was using selection.add but it's sooooooo long that I need your help to find a better way of doing it
i've been trying to use :
Code:
myselection.item(i).visproperties.GetShow showstate
the workking code goes something like this
Code:
Dim CATIA As Object
Dim myselection As Selection
Dim textlist() As String
Dim showstate As CatVisPropertyShow
Set CATIA = GetObject(, "CATIA.Application")
Set myselection = CATIA.ActiveDocument.Selection
for each sheet in CATIA.ActiveDocument.sheets
for each view in sheet.views
redim textlist(view.texts.count)
myselection.clear
for i = 1 to view.texts.count
myselection.add texts.item(i)
myselection.VisProperties.GetShow showstate
If showstate = 1 Then ''''''''''''''''''''''''''''''''''caché
textlist(i) = ", HIDDEN TEXT"
ElseIf showstate = 0 Then ''''''''''''''''''''''''''''''visible
textlist(i) = ", VISIBLE TEXT"
End If
myselection.clear
next
'do stuff with the textlist()
next
next
Thank you for the help
jissi