CommandManager Pick not selecting ArcDimensionalContraint

CommandManager Pick not selecting ArcDimensionalContraint

bradeneuropeArthur
Mentor Mentor
295 Views
7 Replies
Message 1 of 8

CommandManager Pick not selecting ArcDimensionalContraint

bradeneuropeArthur
Mentor
Mentor

Why is this not selecting ArcDimensionalConstraints in a sketch:

 

Dim cmd As CommandManager = ThisApplication.CommandManager
Dim sp1 As Object = cmd.Pick(Inventor.SelectionFilterEnum.kAllEntitiesFilter, "Select")
msgbox(sp1.Type)

  

bradeneuropeArthur_0-1736760418097.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
296 Views
7 Replies
Replies (7)
Message 2 of 8

Michael.Navara
Advisor
Advisor

It looks like this entity is not supported by API.

Here is modified code for pre-selected entities

 

Dim part As PartDocument = ThisDoc.Document

Dim selection As SelectSet = part.SelectSet
If selection.Count = 0 Then
	Logger.Info("Nothing selected")
	Return
End If

Dim firstSelectedObject As Object = selection.Item(1)
If firstSelectedObject Is Nothing Then
	Logger.Error("Unsupported")
Else
	Dim objectType As ObjectTypeEnum = firstSelectedObject.Type
	logger.info(objectType.ToString())
End If

 

Message 3 of 8

WCrihfield
Mentor
Mentor

It is very strange that we can access, interact with, and make changes to these types of objects through 'normal' Inventor API means, there is an Inventor API object type for them ArcLengthDimConstraint, which is derived from the base class DimensionConstraint.  Not only that, but this object type is also included in the main ObjectTypeEnum as 'kArcLengthDimConstraintObject' (and 'kArcLengthDimConstraintProxyObject').  And we do have something in the SelectionFilterEnum for this object's base Type 'kSketchDimConstraintFilter', which will let us select those other variations of these types of objects, but just not this one specific sub type of them.  Even using the 'Pre-Select' method to select them, then inspecting their Type, it recognizes that 'something' was pre-selected, because the SelectSet is more than one, but then that one object's 'TypeName(oObj) = "Nothing", and throws an error when trying to get its ObjectTypeEnum variation, even though there is a value for them.

This really feels like there is a bug in this area of the Inventor API, or maybe some of the supporting source code needs to be updated to include 'selection' support for that sub type variation, since we can select the other sub types of the same base type.

By the way, this is sort of connected to this other recent forum post:  How to edit dimensional constrain with the Inventor Dialog showing 

I 'tagged' Mike Deck from that conversation, to see if he may be able to shed some light on this odd situation.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 4 of 8

bradeneuropeArthur
Mentor
Mentor

Thanks @WCrihfield,

That is indeed my question how to add the newly created ArcDimConstrain to the selectset and edit it.

Because the add to the selectset is not possible these posts are related indeed.

@johnsonshiue do you and your team have any suggestions and or may confirm the bug?

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 5 of 8

MjDeck
Autodesk
Autodesk

@bradeneuropeArthur and @WCrihfield - I'm looking into this. Since there is an API object (ArcLengthDimConstraint), the Pick function should work on it. I'll see if this is a known issue.


Mike Deck
Software Developer
Autodesk, Inc.

Message 6 of 8

bradeneuropeArthur
Mentor
Mentor

That would be great 

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

MjDeck
Autodesk
Autodesk

It looks like this was not previously a known issue. It is now: INVGEN-82862.
Thanks for finding this.


Mike Deck
Software Developer
Autodesk, Inc.

Message 8 of 8

bradeneuropeArthur
Mentor
Mentor
You are more than welcome Mike,

Could you please inform us when things have been resolved?

Great for taking this seriously.

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