In this lesson you will learn to fully automate the creation of an assembly, with particular emphasis given to mating techniques.
An alternative to mating with named entities is to use mate references. As with mate entities, this requires your designers to include the mate references beforehand to make automation simpler. See IMateReference interface for more information. In my opinion, however, automation using mate references is much more tedious than automating with named entities.
If for some reason named entities are not an option but you don’t want to go the tedious mate references route then you can also create reference geometry like planes and axes to use with mating. Using IModelDocExtension::SelectByID2 you can easily select the reference geometry.
Lesson 5.1 start code
Lesson 5.1 – drawer
Lesson 5.1 – crank