Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

oView.Label.FormattedText not working ?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
salariua
419 Views, 1 Reply

oView.Label.FormattedText not working ?

Hi guys,

 

I have just realised that the oView.Label.FormattedText is not working anymore. It was working before "Hot-Fix INV19102" and now trows an error.

 

Try to change the view label like with this code from Curtis:

 

Dim oSSet As SelectSet = ThisDoc.Document.SelectSet
If oSSet.count = 0 Then
	MessageBox.Show("You must select a drawing view first", "iLogic")
Exit Sub
End If

'Reference to the drawing view from the 1st selected object
Dim oView As DrawingView = trycast(oSSet.item(1), DrawingView)

If oView IsNot Nothing Then
oView.ShowLabel = True
'format the model iproperties	
oDescription = "<StyleOverride Underline='True'><Property Document='model' PropertySet='Design Tracking Properties' Property='Description' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='29'>DESCRIPTION</Property></StyleOverride>"
oPartNumber = "<StyleOverride Underline='True'> - Mk <Property Document='model' PropertySet='Design Tracking Properties' Property='Part Number' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='5'>PART NUMBER</Property></StyleOverride>"
oStringMass = "<Br/><StyleOverride Underline='False' FontSize='0.35'>EST UNIT MASS = <PhysicalProperty PhysicalPropertyID='72449' Precision='2'>MASS</PhysicalProperty></StyleOverride>"
oStringScale = "<Br/><StyleOverride FontSize='0.3'>(Scale <DrawingViewScale/>)</StyleOverride>"

'add to the view label
oView.Label.FormattedText =  oDescription & oPartNumber & oStringMass & oStringScale	    

Else
	MessageBox.Show("The selected object is not a drawing view", "iLogic")
End If

 

 

It all goes well till seetting the view label.

 

Thanks.

 

 

 

 

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
1 REPLY 1
Message 2 of 2
salariua
in reply to: salariua

Face slap.

 

Nevermind this, I was having overlapping views and using rectangular selection didn't help as well.

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report