Hi!
Environment:
Inventor 2013 professional, VS 2010, C#
I am trying to filter an imported part (single ipt) with several hundreds of surface bodies in it. (This file comes from a PDMS export towards step and the imported with the task scheduler.) There are about 300 little cubes (1cmx1cmx1cm) which I can easily identify by evaluating the edges – I want to delete those. I hoped for a small solution with the apprentice server, but now I am stuck with the final step:
ApprenticeServerDocument oDoc = asc.Open(oldPartName); oDoc.ComponentDefinition.SurfaceBodies[0].Delete();
I though the SurfaceBody.Delete Method should make me happy – but I get the error “parameter is incorrect” (see screeny attached).
What am I doing wrong or do you have a workaround in mind?
Thanks for your support!
Kai
I thought I was one step further by trying to delete the Feature of the solid body,
but I get the same error for the following line
oDoc.ComponentDefinition.SurfaceBodies[0].CreatedByFeature.Delete(false, false, false);
Hi Kay,
Two important remarks to keep in mind:
1/ All indices for collections in the Inventor API start from 1
2/ Apprentice doesn't support modifying the Inventor files, it can only modify iProperties
Regards,
Philippe.