Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Named Mate Connectors

lemon1324lemon1324 Member, Developers Posts: 223 EDU
When manually creating a mate connector, renaming the mate connector feature (e.g. to "First") will result in that name appearing in the mate query box in an assembly (e.g. "First of Part").

Is it possible to achieve the same functionality for mate connectors placed using a FeatureScript that places many mate connectors at once? Neither mateConnector() nor opMateConnector() appear to take a name parameter. Is it possible to set an attribute, or is this functionality in Assemblies implemented outside the scope of what FeatureScript can access?
Arul Suresh
PhD, Mechanical Engineering, Stanford University

Comments

  • Alex_KempenAlex_Kempen Member Posts: 244 EDU
    If manually renaming a mate connector causes the assembly to update, then renaming mate connectors using setPropery with PropertyType.NAME and value equal to your name should do the trick. Be warned, however, that creating multiple mate connectors per feature can be pretty reliable from a robustness perspective; setExternalDisambiguation (and, by extension, forEachEntity) don't work for mate connectors which have been used in an assembly, resulting in behavior like reordering or removing queries breaking all uses of mate connectors in assemblies for that feature.
    CS Student at UT Dallas
    Alex.Kempen@utdallas.edu
    Check out my FeatureScripts here:



  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    Unfortunately mate connectors are currently named in assemblies via their *feature* name, which is not something which exists or is settable in FeatureScript for mate connectors created inside non-mate-connector features.

    You can file an improvement request to add this capability!
  • Jonathan_HutchinsonJonathan_Hutchinson Member Posts: 62 PRO
    I don't quite get this - is there a workaround to be able to name the opMateConnector result from a sting input parameter?
Sign In or Register to comment.