How to add Views to a Publishing set

How to add Views to a Publishing set

jagostinho74
Collaborator Collaborator
1,098 Views
7 Replies
Message 1 of 8

How to add Views to a Publishing set

jagostinho74
Collaborator
Collaborator

hello,

 

I am trying to find how to add views to a Publishing Set and also on how to turn on said Publishing Set to get publishing in the cloud.

 

Finding that I cannot just use the Viewport.Create method to add the views to the ViewSheetSet as it is not a sheet per se, unless I am reading it wrong.

 

And I could not also find the property that enables the set to be published to the cloud.

 

Anyone knows how to do this programatically?

Thanks in advance for your help

Any

Assistant BIM/CAD Manager

Manchester, UK


0 Likes
1,099 Views
7 Replies
Replies (7)
Message 2 of 8

jeremy_tammik
Alumni
Alumni

Afaik, you select the views and sheets to publish to the cloud manually in the user interface in the publish settings. Unfortunately, I am not aware of any official API access to that.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 8

jeremy_tammik
Alumni
Alumni
0 Likes
Message 4 of 8

RPTHOMAS108
Mentor
Mentor

Via ProjectInfo singleton I see the below extensible storage item with field likely identifying the sheet set used to publish to cloud. You would create view/sheet sets as you normal elsewhere. Not sure what the major/minor fields are for in this schema, that perhaps plays a part in some kind of version control.

 

I note that when you publish to cloud you select the 2D views to see in the model viewer. So this feature as far as I'm aware does not publish those sheets to separate folders on ACC (which would perhaps be more useful).

 

231127a.PNG

Message 5 of 8

jeremy_tammik
Alumni
Alumni

Thank you for the interesting observation. It looks like a simple list of element ids. Its also seems to allow read and write, i.e., it is not impossible to access for other (non-Autodesk) apps and vendors. So, it might be possible to modify. I don't suppose that would be violating any rules, actually. 

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 6 of 8

RPTHOMAS108
Mentor
Mentor

Yes I didn't test myself but I assume it points to a view set or views within such.

 

After accessing the feature via the UI and saving a set the extensible storage is created. It is far easier to set values on extensible storage fields rather than being responsible for managing the lifecycle of the schema itself. It would not be possible to manage the schema in this case due to the vendor id etc.

 

The main issue is that if the feature has not been accessed then the schema doesn't exist. However I expect in the case of @jagostinho74 (working directly for an end user company rather than independent developer) they can create the schema in the template they use through the official UI feature and then perhaps just manipulate the values within.

 

Perhaps a comment for the powers that be is that if open schemas like this existed automatically for this and other similar settings upon file creation then we would not need other specific API functionality to deal with the same. Then it just becomes a case of being informed where to find them and how to use them. Although I expect this feature has evolved from an external add-in, which is perhaps why the setting for such exist as they do.

0 Likes
Message 7 of 8

jeremy_tammik
Alumni
Alumni

Yes, I think they were implemented for the C4R add-in:

 

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 8 of 8

jeremy_tammik
Alumni
Alumni
0 Likes