Re: browsing model files in the cloud (A360 C4R) - Autodesk Community

Re: browsing model files in the cloud (A360 C4R) - Autodesk Community: "/ get cloud document/model and project name
string docName = CollaborateUtils.DocumentFileName(e.Document);
string modelName = null;
string projectName = null;
var docNameSplit = docName.Split(new char[1] { '/' }, StringSplitOptions.RemoveEmptyEntries);
modelName = docNameSplit.Last();
projectName = docNameSplit[1];
// find the current project and model id
var cloudProjects = CollaborateUtils.GetCloudProjects(e.Document);
var currProject = cloudProjects.FirstOrDefault(cp => String.Equals(cp.Name, projectName, StringComparison.CurrentCultureIgnoreCase));
var models = SynchronousManagementClientAccess.GetModels(currProject.Id);
var currModel = models.FirstOrDefault(m => String.Equals(m.Name, modelName, StringComparison.CurrentCultureIgnoreCase));
// publish to BIM360 cloud
VersioningClientFactory versioningClientFac = new VersioningClientFactory();
IVersioningClient versioningClient = versioningClientFac.CreateVersioningClient();
var publishTaskAsync = versioningClient.PublishModelLatestVersionAsync(currProject.Id, currModel.Id, new Func(ManageSSO.getSignedUrl), default(CancellationToken));
publishTaskAsync.Wait();"



'via Blog this'

Comments

Popular posts from this blog

Powerpoint countdown and current time in slides VBA

Revit area plans adding new types and references (Gross and rentable)