-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
DA_Inventor.cs
33 lines (31 loc) · 1.09 KB
/
DA_Inventor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using Autodesk.Forge.Oss.DesignAutomation.Samples.Models;
using Autodesk.Forge.Oss.DesignAutomation.Services;
using System.Threading.Tasks;
namespace Autodesk.Forge.Oss.DesignAutomation.Samples
{
public class DA_Inventor
{
public static async Task<bool> Test()
{
IDesignAutomationService service = new InventorDesignAutomationService("ChangeParam")
{
EngineVersions = new[] { "2021" },
EnableConsoleLogger = true,
EnableParameterConsoleLogger = true,
EnableReportConsoleLogger = true,
};
await service.Initialize(@".\DA\DA4Inventor\samplePlugin.bundle.zip");
var result = await service.Run<InventorParameterOptions>(options =>
{
options.InventorDoc = @".\DA\DA4Inventor\box.ipt";
options.InventorParams = new()
{
height = "16 in",
width = "10 in"
};
});
await service.Delete();
return result;
}
}
}