U225X PUBLIC-SAFE CONVERSATION NOTE RECORD: CHAT-0209 TOPIC: iLogic Dimension Style Toggle IMPORTED: 2026.01.16 This note was generated from a matching conversation in the supplied ChatGPT export. EXTRACTED REQUEST: The way I understand Inventor 2023 and how it works with dimension styles is this. I have the Style Manager and inside that I have the Object Defaults which sets the current style for all dimensions, if I change those it overrides the entire drawing with said style so typically I do not touch those. But if I click a linear dimension or any other dimension to place, I can navigate to the Annotate tab, then under Forma RECOVERED CONVERSATION EXCERPTS USER MESSAGES: 1. I am using Inventor 2023 and I would like to make an ilogic that when a button is pressed or a hot key is used it will toggle which dimension style to use. I can assign the hot key myself so I don't need that as part of the code, more just something that sets the active dimension style the names of the dimension styles are FRACTIONAL 2024, DECIMAL 2024, and ARCHITECTURAL 2024. it would be nice if it was a command that acted like this. you click it once it makes FRACTIONAL 2024 the current, you click it again and i… 2. Error on line 19 in rule: Change_Current_Dimension_Style, in document: 18-451.idw Unable to cast COM object of type 'System.__ComObject' to interface type 'Inventor.StylesManager'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D93EE206-0CA6-401E-B74E-0D9E4F924751}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). 3. The way I understand Inventor 2023 and how it works with dimension styles is this. I have the Style Manager and inside that I have the Object Defaults which sets the current style for all dimensions, if I change those it overrides the entire drawing with said style so typically I do not touch those. But if I click a linear dimension or any other dimension to place, I can navigate to the Annotate tab, then under Format I can select a "Style" and it uses it as an over ride for any of the dimension I place. It also w… ASSISTANT RESPONSES: 1. Yep — you can do this with an iLogic rule that runs in the Drawing (IDW/DWG) environment and cycles the active Dimension Style through: 1) `FRACTIONAL 2024` 2) `DECIMAL 2024` 3) `ARCHITECTURAL 2024` …then repeats. Below is a clean “press once = next style” rule. You can map it to a button/hotkey however you like. [code excerpt omitted] Notes - This changes the default for new dimensions you place (it won’t retroactively restyle dimensions already on the sheet). - If you want a *second* rule that applies the new style to selected dimensions (or all dims in the drawing), tell me which behavior you want and I’ll add it. 2. Perfect — both of those errors are just “iLogic type library quirks”: 1) `DimensionStyles` is not defined in iLogic sometimes, even though it’s a real Inventor API type. Fix: don’t strongly-type that variable — treat it as an `Object`. 2) `iLogicVb.StatusBarText` doesn’t exist in your iLogic environment. Fix: use `ThisApplication.StatusBarText`. Here’s a clean corrected rule that should compile in Inventor 2023 drawings and cycle your 3 styles: [code excerpt omitted] If you want, I can also give you a second rule that applies the newly selected style to selected dimensions (or all dimensions on the sheet/drawing) instead of only affecting *new* dimensions. 3. Yep — what you described is not “Object Defaults” (global defaults), it’s the dimension’s Style override (what that Annotate > Format > Style dropdown changes for the selected/new dimensions). So instead of touching Object Defaults, the most reliable iLogic approach is: - If you have one (or more) dimensions selected: cycle to the next style and apply it to the selected dimensions (exactly like changing the dropdown). - Inventor will usually “remember” that style for the next dims you place after you’ve changed a selected dim’s style (same behavior as you’re used to). Here’s a clean rule that does that and cycles: `FRACTIONAL 2024` → `DECIMAL 2024` → `ARCHITECTURAL 2024` → repeat It also stores the last-used i… EXTRACTED KNOWLEDGE / HOW-TO - `FRACTIONAL 2024` - `DECIMAL 2024` - `ARCHITECTURAL 2024` - This changes the default for new dimensions you place (it won’t retroactively restyle dimensions already on the sheet). - If you want a *second* rule that applies the new style to selected dimensions (or all dims in the drawing), tell me which behavior you want and I’ll add it. - `DimensionStyles` is not defined in iLogic sometimes, even though it’s a real Inventor API type. Fix: don’t strongly-type that variable — treat it as an `Object`. - `iLogicVb.StatusBarText` doesn’t exist in your iLogic environment. Fix: use `ThisApplication.StatusBarText`. - Fix: use `DrawingStylesManager` (drawing-specific) instead of `StylesManager`. CONVERSATION SHAPE: 3 user turns / 5 assistant turns ATTACHMENTS DETECTED: 30 Raw transcripts, private details, exact locations, account information, employer/customer-confidential material, and restricted software references are not published in this note. PROPERTY OF U225X / PUBLIC-SAFE IMPORT