Specify ChainDimensionSet Memeber in Command Selection

Specify ChainDimensionSet Memeber in Command Selection

J-Camper
Advisor Advisor
353 Views
2 Replies
Message 1 of 3

Specify ChainDimensionSet Memeber in Command Selection

J-Camper
Advisor
Advisor

I'm working on a little Automated Dimension Text Script and I'm having issues when trying to specify the selected member of a Chain set using the code below:

 

Dim dimension As DrawingDimension = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingDimensionFilter, "Select a dimension")

My problem is when I go to add text it sometimes does the correct member but other times it doesn't.  It seems dependent on the location of the pointer in relation to the displayed dimension [left side on horizontal chains, bottom side on vertical chains, and less obvious for angled chains].  I was expecting to be able to click anywhere on a member's dimension line [between tick marks] but it doesn't seem to be the case.

 

 

Is this just how Members of a ChainSet members work?  Or is there a way to modify this behavior?

0 Likes
354 Views
2 Replies
Replies (2)
Message 2 of 3

WCrihfield
Mentor
Mentor

I don't know for sure, but there may be a slight type mismatch issue.

Although, I don't really see a better selection filter option that more closely matches.

There are:

ChainDimensionSets (as a Collection Object of ChainDimensionSet)

And

ChainDimensionSet (defined as a ChainDimensionSet placed on a 'Sheet')

But if you dig down into this set to its members, they are actually a GeneralDimension.

ChainDimsnsionSet.Members.Item(1) 'is a GeneralDimension

Just a thought.

Maybe using the kAllEntitiesFilter, then just defining the selected item as a GeneralDimension would work better.

Just spitballing ideas here, trying to help.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 3

J-Camper
Advisor
Advisor

@WCrihfield, Thanks for taking time to look into this.

 

I think this is just how Members of a chainset are separated, and like you said the members end up being GeneralDimensions with no direct link to the chainset itself.  I'm still able to add text to the correct member by remembering which side of the dimension value to click, so I added a disclaimer prompt at the beginning of my rule to serve as a reminder:

'Disclaimer
MessageBox.Show("When adding text to ChainSet Members:" & vbCrLf & vbCrLf & _
		"Horizontal ChainSets: Click on LEFT side of dimension value" & vbCrLf & vbCrLf & _
		"Vertical ChainSets: Click on BOTTOM side of dimension value", "Disclaimer")

I have not tested chainsets on an angle to find out which side to click, but we rarely encounter the need for them so I'm not worried about it for now.

0 Likes