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: 

Default view label settings greyed out/Custom iProperty

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
545 Views, 7 Replies

Default view label settings greyed out/Custom iProperty

Anonymous
Not applicable

Hello, i am trying to create a default view label for parts in inventor drawing.

currently i understand this is not a simple way to select it from the model properties, so now I've added a rule that copies the ITEM nr and QTY from the BOM list and creates custom iProperties.

 

when i add a part and manually edit the view label note, i can access/insert everything:

from custom iproperties to unicode symbols etc.

 

Viewlabel edit.PNG

but when i try to create this in a default view label in the styles editor>view preferences, the editor everything is greyed out, and i dont even get the possibility to insert a custom iProperty.

 

styles editor.PNG

 

I'm running inventor 2018 and my library style is set to read/write

0 Likes

Default view label settings greyed out/Custom iProperty

Hello, i am trying to create a default view label for parts in inventor drawing.

currently i understand this is not a simple way to select it from the model properties, so now I've added a rule that copies the ITEM nr and QTY from the BOM list and creates custom iProperties.

 

when i add a part and manually edit the view label note, i can access/insert everything:

from custom iproperties to unicode symbols etc.

 

Viewlabel edit.PNG

but when i try to create this in a default view label in the styles editor>view preferences, the editor everything is greyed out, and i dont even get the possibility to insert a custom iProperty.

 

styles editor.PNG

 

I'm running inventor 2018 and my library style is set to read/write

Labels (5)
7 REPLIES 7
Message 2 of 8
marcin_otręba
in reply to: Anonymous

marcin_otręba
Advisor
Advisor

Are you trying to do it in template maybe ? or in drawing without any view ? try to add any view first. When i have view it works (adding custom iproperties)

0 Likes

Are you trying to do it in template maybe ? or in drawing without any view ? try to add any view first. When i have view it works (adding custom iproperties)

Message 3 of 8
Anonymous
in reply to: marcin_otręba

Anonymous
Not applicable

Hi @marcin_otręba, yes i am trying  in the drawing and later to save this as a template, but still no luck, even when placing parts in the drawing.

 

like i said when i place a view, you can edit the label and add a custom iProperty to the label,

but for some reason it is greyed out when i try to add it in the default label in view preferences.

(even with the view placed in the drawing)

0 Likes

Hi @marcin_otręba, yes i am trying  in the drawing and later to save this as a template, but still no luck, even when placing parts in the drawing.

 

like i said when i place a view, you can edit the label and add a custom iProperty to the label,

but for some reason it is greyed out when i try to add it in the default label in view preferences.

(even with the view placed in the drawing)

Message 4 of 8
marcin_otręba
in reply to: Anonymous

marcin_otręba
Advisor
Advisor

i think it will be enabled when you choose any iproperty from combobox

0 Likes

i think it will be enabled when you choose any iproperty from combobox

Message 5 of 8
Anonymous
in reply to: marcin_otręba

Anonymous
Not applicable

i don't get the option to add custom iProperties in the default base view label setting:

 

Saltlife212_0-1589803278349.png

Saltlife212_1-1589803310754.png

Saltlife212_2-1589803332335.png

 

while this is the part i currently have in the drawing with the following custom iproperties

 

Saltlife212_3-1589803477956.png

 

 

 

 

0 Likes

i don't get the option to add custom iProperties in the default base view label setting:

 

Saltlife212_0-1589803278349.png

Saltlife212_1-1589803310754.png

Saltlife212_2-1589803332335.png

 

while this is the part i currently have in the drawing with the following custom iproperties

 

Saltlife212_3-1589803477956.png

 

 

 

 

Message 6 of 8
WCrihfield
in reply to: Anonymous

WCrihfield
Mentor
Mentor

The view label style just doesn't recognize any of those properties because they don't exist to it, since the style definition isn't within the context of a specific drawing yet.

What version of Inventor are you using?  One of the features highlighted in Inventor 2021 is the ability to save a ton of view settings within a SheetFormat.  Then you can use that SheetFormat when starting a new drawing to instantly populate all your views with all the same settings as were in place when you saved off the SheetFormat.

If you have 2021 you may be able to create some views the way you want them, then save a new SheetFormat.  Copy that SheetFormat to your Drawing Template file.  Then use it to start your drawing from.

Oops...I didn't see the last line under the picture in your post that specified 2018.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

The view label style just doesn't recognize any of those properties because they don't exist to it, since the style definition isn't within the context of a specific drawing yet.

What version of Inventor are you using?  One of the features highlighted in Inventor 2021 is the ability to save a ton of view settings within a SheetFormat.  Then you can use that SheetFormat when starting a new drawing to instantly populate all your views with all the same settings as were in place when you saved off the SheetFormat.

If you have 2021 you may be able to create some views the way you want them, then save a new SheetFormat.  Copy that SheetFormat to your Drawing Template file.  Then use it to start your drawing from.

Oops...I didn't see the last line under the picture in your post that specified 2018.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 7 of 8
marcin_otręba
in reply to: WCrihfield

marcin_otręba
Advisor
Advisor

Hi,

 

I tried this code:

Dim drawdoc As DrawingDocument
Set drawdoc = ThisApplication.ActiveDocument
Dim oview As DrawingView
Set oview = drawdoc.ActiveSheet.DrawingViews.Item(1)
Dim sm As DrawingStylesManager
Set sm = drawdoc.StylesManager
sm.ActiveStandardStyle.SetViewLabelDefaults kStandardDrawingViewType, "", True, oview.Label.FormattedText, False, True

But without luck, instead of setting up viewlabel defaults you can have rule wchich will go troug all views on document save and set it up as well. you can use oview.label.formattedtext to do it.

 

Hi,

 

I tried this code:

Dim drawdoc As DrawingDocument
Set drawdoc = ThisApplication.ActiveDocument
Dim oview As DrawingView
Set oview = drawdoc.ActiveSheet.DrawingViews.Item(1)
Dim sm As DrawingStylesManager
Set sm = drawdoc.StylesManager
sm.ActiveStandardStyle.SetViewLabelDefaults kStandardDrawingViewType, "", True, oview.Label.FormattedText, False, True

But without luck, instead of setting up viewlabel defaults you can have rule wchich will go troug all views on document save and set it up as well. you can use oview.label.formattedtext to do it.

 

Message 8 of 8
WCrihfield
in reply to: Anonymous

WCrihfield
Mentor
Mentor

Hi @Anonymous.  When you start dealing with FormattedText, it can get fairly complicated, because then you're dealing with another programming language.  FormattedText uses XML.  It is very similar to HTML, but where HTML is mainly about displaying data the way you want, XML is all about storing and transferring Data.

Here's a tip to help you figure out just enough to get the job done.

Set up the first view the way you want it, after you've got a part on the sheet.  Put whatever Custom iProperties you want in there.

Now use a MessageBox.Show(), or MsgBox(), or better yet an InputListBox() (using InputListBox is often better, because its contents are selectable) to show yourself what its FormattedText version looks like.

MsgBox("View Label FormattedText Looks Like This:" & vbCrLf & oView.Label.FormattedText)

It can look pretty 'busy', but I'm sure you can figure it out from there.

There are several XML resources available on line, but they may not be as helpful as expected when dealing with Inventor's internal structure.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Hi @Anonymous.  When you start dealing with FormattedText, it can get fairly complicated, because then you're dealing with another programming language.  FormattedText uses XML.  It is very similar to HTML, but where HTML is mainly about displaying data the way you want, XML is all about storing and transferring Data.

Here's a tip to help you figure out just enough to get the job done.

Set up the first view the way you want it, after you've got a part on the sheet.  Put whatever Custom iProperties you want in there.

Now use a MessageBox.Show(), or MsgBox(), or better yet an InputListBox() (using InputListBox is often better, because its contents are selectable) to show yourself what its FormattedText version looks like.

MsgBox("View Label FormattedText Looks Like This:" & vbCrLf & oView.Label.FormattedText)

It can look pretty 'busy', but I'm sure you can figure it out from there.

There are several XML resources available on line, but they may not be as helpful as expected when dealing with Inventor's internal structure.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

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

Post to forums  

Autodesk Design & Make Report