I want to automatically create Dimension in a Drawing using predefined matereferences. Now i cannot select matereferences as I could do with something else (e.g. planes) using the id with @ part @ assembly ... I tried to get the component (drawingsheet->view->component) where the matereference is and select it like this:
ModelDoc2 mdl = comp.GetModelDoc2();
var mdlext = mdl.Extension;
bool status = mdlext.SelectByID2("Default-<1>", "POSGROUP", 0, 0, 0, false, 1, null, (int)swSelectOption_e.swSelectOptionDefault);
status is TRUE, but it's not selected nor does the function AddDimension2 add a dimension...
any solutions, hints or alternatives are welcome.
SolidworksApi macros