How to edit dimensional constrain with the Inventor Dialog showing

How to edit dimensional constrain with the Inventor Dialog showing

bradeneuropeArthur
Mentor Mentor
448 Views
7 Replies
Message 1 of 8

How to edit dimensional constrain with the Inventor Dialog showing

bradeneuropeArthur
Mentor
Mentor

How can I edit a dimensional constrain with the Inventor Dialog showing, as in the picture.

bradeneuropeArthur_1-1736514263365.png

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

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

WCrihfield
Mentor
Mentor

Hi Arthur.  This is just an educated guess, but that looks a lot like a 'MiniToolbar', which we can create with the CommandManager.CreateMiniToolbar method.  If you look into the VBA sample the online help page links to, you can see that these can be pretty dynamic, if you want to put that much effort into them.  I have only used them for very basic purposes myself, so far, but plan on utilizing them more in the future, due to how convenient they can be.  The text box control within it could likely show the DimensionConstraint.Parameter.Expression value, for editing that directly.  But I'm not sure it would behave exactly the same, due to how we can actually assign or change the names of the parameters involved through those 'normal' mini dialogs.  How to add that little fly-out control as the right edge of the text box control, I'm not sure about at the moment.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 8

WCrihfield
Mentor
Mentor

I was interested in this, so I went ahead and explored into it myself a bit.  I will attach the code I have put together so far, but it is not finished yet.  The resulting dialog does not look exactly like the one expected yet either, but maybe there is still a way to change that.  It may simply not a MiniToolbar, but a custom Windows Form or something similar to that.  It's not working exactly as planned yet either, but not causing any major problem when used right now either.  But the edits do not take immediate effect, or not the expected immediate effect yet.  Needs some update or rebuild type something included at the events.  I did put some exploratory stuff into it also, in an attempt to figure out what is going on.  Seems there are already 6 default controls in it, but two are unknown type.

 

I'm leaving for the day, and weekend right now though.  Have a great weekend, and maybe I'll revisit this on Monday, if I'm not swamped with other stuff. 😉

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 4 of 8

marcin_otręba
Advisor
Advisor

Hi, you want to show this dialog ?

 

thisapplication.CommandManager.ControlDefinitions("AppDimensionEditCmd").execute

 

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 5 of 8

bradeneuropeArthur
Mentor
Mentor

No that is not what I need. When I create a new dimension I want to edit this afterwards.

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 6 of 8

bradeneuropeArthur
Mentor
Mentor

@WCrihfield Thanks for that code.

But it does not allow me to pick/select a ArcLengthDimensionalConstrain.

Do you have any idea..

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 7 of 8

WCrihfield
Mentor
Mentor

Hi Arthur.  I had not noticed that before, because I pretty much never use that specific type of dimension, but I do see it this morning.  This is certainly very odd, and seems like it might be a bug.  I have tried most of the filter settings within the SelectionFilterEnum, including the original "kSketchDimConstraintFilter", which does lets me select other sketch dimension types, but not that type, for some reason.  Also tried the most generic of them all "kAllEntitiesFilter", which still will not allow me to select it.  I am still using Inventor Pro 2024.3.3 at the moment, but I am not sure if this is a 'version' specific issue or not.  This should likely be brought to the attention of someone at Autodesk, like maybe @MjDeck.  If anyone can confirm, deny, or explain this situation, it is likely him.  And if not, he will most likely be able to inform the rest of the team at Autodesk about this situation, so that it can get it fixed.

 

The first thing that came to mind though, when I first read your question, was the line of code at around Line 39, and the other line where that is being used (Line 68)...the ValueUnitsTypeEnum, which threw me off at first, because I am used to working with either of the other two very similar sounding ones (ValueTypeEnum & UnitsTypeEnum).  I did not get the chance to figure out a reliable way to determine the proper value of that Enum from the selected DimensionConstraint or its Parameter, so that I could dynamically set the proper value for it in Line 68 (where it is creating the 'MiniToolbarValueEditor' control).  But it would not be logical for that one setting within the Class block of code to cause the 'Pick' function outside of that area to not work properly.  In the short term, we may have to use a custom 'Picker' type Class (using the InteractionEventsSelectEvents, & OnSelect Event), instead of the simple Pick function, and instead of relying on the SelectionFilterEnum, we can use the ObjectTypeEnum, or TypeOf operator or TypeName function in a custom block of code within the OnSelect event handler, to do the selection filtering for you.  If that would be possible, or worth while in this situation.

Mike may even know of a better way to achieve what you are trying to do here than us.  I've got some other stuff to catch up on at work this morning, but will undoubtedly be thinking about this interesting challenge while doing so. 

 

Edit:  Posting Link to other related forum topic:  CommandManager Pick not selecting ArcDimensionalContraint 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 8 of 8

bradeneuropeArthur
Mentor
Mentor

@WCrihfield Thanks for that.

 

I have tried the same steps also and I am on Inventor 2025!

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes