Warm tip: This article is reproduced from serverfault.com, please click

Is there a posibility to export a SVF from a DWG in an InventorPlugin

发布于 2020-02-05 09:00:46

I am currently triying to use an Inventor Automation to modify a drawing and then export it to the SVF Format for the Viewer. Therefore I used this sample project from an Autodesk developer:

https://github.com/akenson/da-extract-params

I tried the code for exporting a 3D Drawing as SVF and that works fine. But when I tried to export a 2D drawing (like a DWG) to SVF, the SVF Addin doesn't create a file.

The Problem appears in the Method CreateForgeViewable() in the SampleAutomation Class in the ExtractParamsPlugin Projekt. I think the problem could be the configuration of the options for the Addin... But I couldn't find a Documentation for the SVF Addin.

// Setup SVF options
if (oAddin.get_HasSaveCopyAsOptions(doc, oContext, oOptions))
    {
        oOptions.set_Value("GeometryType", 1);
        oOptions.set_Value("EnableExpressTranslation", true);
        oOptions.set_Value("SVFFileOutputDir", sessionDir);
        oOptions.set_Value("ExportFileProperties", false);
        oOptions.set_Value("ObfuscateLabels", true);
    }

Is there any parameter, that I should set for exporting a DWG to a SVF? Or is there somewhere a documentation for this Plugin?

I would be really thankfull for a reply.

Best regards

Sebastian

Questioner
Sebastian König
Viewed
0
Xiaodong Liang 2020-02-20 09:37:33

Currently, we only support SVF for 3D from Design Automation of Inventor (DA4I). If you want SVF for 2D DWG you can either go through Model Derivatives, or output to PDF by DA4I and use it in Forge Viewer (by pdf.js), or output DWG from DA4I and then go to Design Automation of AutoCAD (DA4A) to export.