Posts

Showing posts from January, 2018

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 = versioningCl…