Ilogic - change view label properties

Ilogic - change view label properties

Anonymous
Not applicable
1,313 Views
2 Replies
Message 1 of 3

Ilogic - change view label properties

Anonymous
Not applicable

Hi,

 

Does anyone know how to change the view label in the base view only!!

I have this code but it adds it to all views.

 

SyntaxEditor Code Snippet

'start of ilogic code


sString1 = "<Property Document='model' PropertySet='Design Tracking Properties' Property='Description' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='29'>DESCRIPTION</Property><StyleOverride Underline='True'>"
sString2 = "<Property Document='model' PropertySet='Design Tracking Properties' Property='Material' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='20'>MATERIAL</Property></StyleOverride><StyleOverride Underline='True'> - </StyleOverride><StyleOverride Underline='True'><Property Document='model' PropertySet='User Defined Properties' Property='Thickness' FormatID='{D5CDD505-2E9C-101B-9397-08002B2CF9AE}' PropertyID='6'>Thickness</Property></StyleOverride>"



Dim oDoc As DrawingDocument:  oDoc = ThisDoc.Document
oModel = ThisDoc.ModelDocument

Dim oSheets As Sheets
Dim oSheet As Sheet
Dim oViews As DrawingViews
Dim oView1 As DrawingView
oSheets = oDoc.Sheets

For Each oSheet In oSheets

oViews = oSheet.DrawingViews
    For Each oView1 In oViews
    'make view label visible
    
   oView1.ShowLabel = True
   
    
    
 
    oView1.Label.FormattedText = sString1 & "<Br/>" & sString2 

    Next
Next


'end of ilogic code

 

I think it has something to do with oview1.showlabel = true.

 

ISyntaxEditor Code Snippet

oDrawView.DisplayDefinitionInBase = True

and the above line but I cannot figure it out. 

0 Likes
Accepted solutions (1)
1,314 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

Hi,

 

I think this would help you,

 

Change these lines of your code..

 

For Each oView1 In oViews
'make view label visible

If oView1.ViewType = 10501 Then
' 10501 is a base type (kStandardDrawingViewType) enum
oView1.ShowLabel = True
oView1.Label.FormattedText = sString1 & "<Br/>" & sString2
End If

Next

 

0 Likes
Message 3 of 3

Anonymous
Not applicable
Works great many thanks.
0 Likes