Drawing style update

Drawing style update

jatin.devaiya
Explorer Explorer
612 Views
4 Replies
Message 1 of 5

Drawing style update

jatin.devaiya
Explorer
Explorer

Hi,

 

I’m looking for solution to update the Text height of drawing when the sheet size is changed.

 

for example:

Sheet size: A3 > Text height: 3mm

Sheet size:A2 > Text height: 3.50mm

 

i know how to update it in style editor only thing is I can’t link this function to sheet size.

 

is there any way to link that function with sheet size? 

0 Likes
613 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Hi @jatin.devaiya.  Unfortunately, there isn't a way to make this happen automatically every time you change the sheet size.  Within the Inventor API, there are several 'events' that can be 'monitored' or listened for, so you can do something in response to them, but changing sheet size is not one of them.  So whatever amount of automation you may want to create to help with this situation, there will always need to be a manual interaction on your part to change the default text style.  The active default text style, when working in a drawing, is defined within the active 'Standard' style, and active 'Object Defaults' settings within that standard style, relating to objects that include text.  I would recommend that you create one or more 'Standard' styles for use with each sheet size, in the Styles & Standards Editor dialog (on the Manage tab).  Within each 'Standard' style, you can have a sets of other types of styles, and you can specify an 'Object Defaults' type of style to use.  Within that 'Object Defaults' style, you can specify which individual style is to be used in the many different situations, while that main 'Standard' style is active.

 

Then once all that is set-up, you may need to save each new style (of every time) that you have created to the 'Style Library'.  That way all these new styles will be available to other documents.  Then you may want to update or create any Template drawing files with these new styles, then re-save them.  Then when you open a drawing and you want to change to a different 'Standard' style to use, go to the Tools tab > Document Settings > Standard tab, and choose a different Standard from the drop-down list.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 5

jatin.devaiya
Explorer
Explorer

Hi @WCrihfield ,

Thank you for your response. I want to do this with Inventor API. Can you let me know the 'events' which is available in Inventor API?

Or Is it possible to add command on right click of the Sheet? It yes, how can I add it?

0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor

Hi @jatin.devaiya.

Here is a link to one of my contribution posts in which I list a lot of links to information about most of the events available.

I don't think you will be able to modify the right-click menu to add something like this to it.

You could very likely create an iLogic rule that will change the default text style for you.  Then you would either need to manually run the rule when needed, or use some other event available to us to trigger the rule to run automatically.  One option might be to create either a custom iProperty or a user parameter named something like SheetSize, with a value equivalent to the current sheet size.  Then when you want to change the sheet size, first change this parameter or iProperty's value.  Then the iLogic rule could change the sheet size for you, and change the text style too, and that rule could be triggered by the iProperty change or user parameter change event listed in the Event Triggers dialog.  The potential problem with this idea though is that it is possible to have multiple different sized sheets in one drawing, but only one iProperty or parameter trying to keep track of it.  There is no event for when you switch from viewing one sheet to viewing another sheet in a drawing, so we couldn't update the value every time that event happens.  But if all sheets are always the same size within one drawing, there shouldn't be any problem.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 5 of 5

jatin.devaiya
Explorer
Explorer

ok.

Thank you @WCrihfield 

0 Likes