Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We use VaultInventorServer to generate STEP files in Vault.
This works fine for PART files, but results in almost empty stp files when used with ASSEMBLY files.
When i run similar code as VBA in Inventor the results are ok.
It seems to me bug in the VaultInventorServer with the translator extension for step files.
// Rendition STP
private void ExecuteStp(
InventorServer inv,
Document doc,
string sourceFile)
{
// define file name
var fileName = sourceFile + ".stp";
// initialize translator
TranslatorAddIn translator = inv.ApplicationAddIns.ItemById["{90AF7F40-0C01-11D5-8E83-0010B541CD80}"] as TranslatorAddIn;
TranslationContext transContext = inv.TransientObjects.CreateTranslationContext();
transContext.Type = IOMechanismEnum.kFileBrowseIOMechanism;
DataMedium transData = inv.TransientObjects.CreateDataMedium();
transData.FileName = fileName;
NameValueMap transOptions = inv.TransientObjects.CreateNameValueMap();
if (translator.HasSaveCopyAsOptions[doc, transContext, transOptions] == true)
{
transOptions.Value["ApplicationProtocolType"] = 3;
}
// export to file
translator.SaveCopyAs(doc, transContext, transOptions, transData);
}
Solved! Go to Solution.