Allowing for mate connector selection. What's the correct syntax?
I'm testing out different query types and wanted to allow for users to select a Mate Connector. However, when I wrote out:Filter" : EntityType.BODY && (…|| BodyType.MATE_CONNECTOR),
the feature dialog doesn't allow for mate connector selection or show the mate connector symbol until I add|| AllowMeshGeometry.NO
as well. Doesn't make a ton of sense to me. Is there anything different I need to do?
Ramon Yip | glassboard.com
Best Answers
-
This works for me:
annotation { "Name" : "Center", "Filter" : EntityType.VERTEX || BodyType.MATE_CONNECTOR, "MaxNumberOfPicks" : 1 }
definition.centerPoint is Query;0 -
Here is a related post that may be useful for you: https://forum.onshape.com/discussion/15736/implicit-mate-connectors-act-differently-than-explicit-ones…
And here is a quick way to get the implicit mate connector button to appear, just ensure there are multiple body options (not just one body filter option) and that MATE_CONNECTOR is one of them:
annotation { "Name" : "myMate", "Filter" : BodyType.MATE_CONNECTOR || BodyType.MATE_CONNECTOR } definition.myMate is Query;
▚▞▚▞▚▞▚▞▚0
Answers
-
This works for me:
annotation { "Name" : "Center", "Filter" : EntityType.VERTEX || BodyType.MATE_CONNECTOR, "MaxNumberOfPicks" : 1 }
definition.centerPoint is Query;0 -
Here is a related post that may be useful for you: https://forum.onshape.com/discussion/15736/implicit-mate-connectors-act-differently-than-explicit-ones…
And here is a quick way to get the implicit mate connector button to appear, just ensure there are multiple body options (not just one body filter option) and that MATE_CONNECTOR is one of them:
annotation { "Name" : "myMate", "Filter" : BodyType.MATE_CONNECTOR || BodyType.MATE_CONNECTOR } definition.myMate is Query;
▚▞▚▞▚▞▚▞▚0 -
"multiple body" options. That sounds like the issue I was running into. However, both other answers work as well.
Thanks! @Konst_Sh @Matt_Shields @MichaelPascoeRamon Yip | glassboard.com
1 -
@MichaelPascoe BodyType.MATE_CONNECTOR || BodyType.MATE_CONNECTOR
That's insane that it works like that. Good to know.
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn
0




