I have a curious problem when loading a Creo sheetmetal file into our APS application. The bit I am having problems with is obtaining the surface body count from the SheetMetalComponentDefinition.
SheetMetalComponentDefinition scd = (SheetMetalComponentDefinition)partDocument.ComponentDefinition;
var bCount = scd.SurfaceBodies.Count;
When we run it locally using the locally installed inventor instance:
InventorServer server = inv.GetInventorServer();
We get a valid surface count. When we run it via APS:
public void Activate(ApplicationAddInSite addInSiteObject, bool firstTime)
{
Trace.TraceInformation(": UpdateIPTParam (" + Assembly.GetExecutingAssembly().GetName().Version.ToString(4) + "): initializing... ");
// Initialize AddIn members.
_inventorServer = addInSiteObject.InventorServer;
Automation = new SampleAutomation(_inventorServer);
}
The surface count is ZERO?
Any ideas would be appreciated. Sample creo file available: Sample Creo File
Thanks