Reputation: 5
I am trying to translate a revit model to SVF. For a particular model, only when i pass {"generateMasterViews": true}, i am able to translate the file. But i wonder how to define this value in Forge C# API.
I Tried to pass the value for IJobPayloadItemAdvanced, but noluck
Note : I am using Autodesk.Forge 1.9.7 Nuget
Thanks in Advance
Regards, Chockalingam
Upvotes: 0
Views: 86
Reputation: 7070
It's straightforward. Just specify the JobSvfOutputPayloadAdvanced
with GenerateMasterViews=true
to the 3rd argument of the JobPayloadOutput
.
var urn = "dXJuOm...Ty5ydnQ";
JobPayloadInput jobInput = new JobPayloadInput (urn);
JobSvfOutputPayloadAdvanced advancedConfigs = new JobSvfOutputPayloadAdvanced();
advancedConfigs.GenerateMasterViews = true;
JobPayloadOutput jobOutput = new JobPayloadOutput (
new List<JobPayloadItem> (
new JobPayloadItem [] {
new JobPayloadItem (
JobPayloadItem.TypeEnum.Svf,
new List<JobPayloadItem.ViewsEnum> (
new JobPayloadItem.ViewsEnum [] {
JobPayloadItem.ViewsEnum._2d, JobPayloadItem.ViewsEnum._3d
}
),
advancedConfigs
)
}
)
);
JobPayload job = new JobPayload (jobInput, jobOutput);
var derivativesAPI = new DerivativesApi();
DerivativesAPI.Configuration.AccessToken = "eyJhbG...";
bool bForce = true;
var response = await derivativesAPI.TranslateAsyncWithHttpInfo (job, bForce);
Upvotes: 0