Solved
Using SetConstraints() in vb api
Hello,
In the below code, where Assembly is a IpfcAssembly assembled in parentAssembly, why would it return "Object type mismatch" on the last line?
IpfcComponentFeat asmComp = (IpfcComponentFeat)parentAssembly
.AssembleComponent((IpfcSolid)Assembly, null);
IpfcComponentConstraint constraint = (new CCpfcComponentConstraint())
.Create((int)EpfcComponentConstraintType.EpfcASM_CONSTRAINT_DEF_PLACEMENT);
IpfcComponentConstraints constraints = new CpfcComponentConstraints();
constraints.Insert(constraints.Count, constraint);
asmComp.SetConstraints(constraints, null); <--- Error
Regards

