Changing ViewAnnotation Style

Changing ViewAnnotation Style

anita_zhangBRAD8
Contributor Contributor
339 Views
7 Replies
Message 1 of 8

Changing ViewAnnotation Style

anita_zhangBRAD8
Contributor
Contributor

Hi, 

 

I am struggling with changing the ViewAnnotation Style. I can successfully locate and access the desired style but I couldn't find an approach to apply it to my drawing view (oView2).

 

I saw a few posts from 2018/2019 saying ViewAnnotationStyle is not exposed in Inventor API. 

 

Does anyone know if changing ViewAnnotationStyle is supported in Inventor now? If so, how can I set it?

 

Thank you so much for the help! 

	Dim oView2 As DrawingView
	oView2 = oSheet.DrawingViews.AddSectionView(oView1, oSectionSketch, oPoint2, kFromBaseDrawingViewStyle, oView1.Scale, True, "A")

	Dim annotationStyle As Inventor.Style
	annotationStyle = oStylesMgr.Styles.Item("Custom View Annotation (ISO)")

	MsgBox(annotationStyle.Type.ToString)    ---- this prints out Style Object

 

0 Likes
340 Views
7 Replies
Replies (7)
Message 2 of 8

JMGunnar
Collaborator
Collaborator

explian more 

 

its there label text you looking for ? 

 

oView2.label.textstyle  

 

best JG

oView2

 

0 Likes
Message 3 of 8

anita_zhangBRAD8
Contributor
Contributor

Hi JG, thank you for your reply. I meant the whole format of a section line such as the section arrow, text style. Here is the screenshot of my custom style.

anita_zhangBRAD8_0-1731938508186.png

I've tried to change the view label style, but the result was not what I expected. 

 

0 Likes
Message 4 of 8

JMGunnar
Collaborator
Collaborator

Do you only wont too  apply  ViewAnnotation Style too  one "view2" 

or  you can set Object default standard 

 

Best Regards Johan

 

JMGunnar_0-1731961027540.png

 

0 Likes
Message 5 of 8

anita_zhangBRAD8
Contributor
Contributor

Hi Jonan. Yes I only want to change "view2". 
I've tried setting object defaults too. I successfully set other style such as parts list style using object defaults. But according to the link here: Inventor 2024 Help | ObjectDefaultsStyle Object | Autodesk, there are not any methods about view annotation style, or section line style. So I doubt Inventor API supports this functionality now. 

0 Likes
Message 6 of 8

JMGunnar
Collaborator
Collaborator

 about view annotation style not supporting in API

like you alread know.

 

why do you only want too change view2 ??? 

can you post one picture one the view you want too change ?

 

Best Regards Johan

 

 

 

 

0 Likes
Message 7 of 8

anita_zhangBRAD8
Contributor
Contributor

Hi Johan, yeah for sure. 
Here is the original style:

anita_zhangBRAD8_0-1732026222663.png

 

Here is the expected style:

anita_zhangBRAD8_1-1732026372128.png

 

I want to change the style of section line A only, it's just a client request.

0 Likes
Message 8 of 8

anita_zhangBRAD8
Contributor
Contributor

Yeah, from my research from the internet, it seems like there's no way to directly change viewannotation style for now. Is there anyway to change the parameters of standard style applied to that section line? 

0 Likes