Disabling Cast Shadows and Ambient Shadows

Disabling Cast Shadows and Ambient Shadows

Anonymous
Not applicable
3,041 Views
11 Replies
Message 1 of 12

Disabling Cast Shadows and Ambient Shadows

Anonymous
Not applicable
I am trying to turn cast shadows and ambient shadows on project views off. The purpose is to ensure that vector printing can occur, because in Revit, if there are shadows or ambient occlusions, or anything that is not hidden line or consistent color (2017+), Revit will print as raster (without a warning), even if you ask for vector. This becomes an issue in BIM 360 Docs, and DWF, PDF printing since raster quickly loses resolution as you zoom in. In 360 and DWF, this means, you can't actually click on objects and see their properties which is quite unfortunate.
 
Using Dynamo and Archi-lab packages, I have been able to deal with the hidden line setting via builtin parameter overriding, but from my research, it sounds like maybe it is not possible to turn off shadows/ ambient occlusions in the View Styles -> Graphic Display Options using exclusively the API. 
 
I understand the workaround would be to create a view template with hidden line, shadows and ambient shadows off and then apply it to the views, but I was hoping for a solution that could harness the API in its entirely rather than having to open two projects, transfer project standards, etc. Regardless, it would be nice to at least be able to do some error checking on the user end, if Autodesk is unable to before printing/exporting to avoid this issue.
unnamed.png
 
0 Likes
3,042 Views
11 Replies
Replies (11)
Message 2 of 12

jeremytammik
Autodesk
Autodesk

Dear Edwin,

 

Thank you for your query and posting it here in the public discussion forum.

 

I am checking with the development team for you.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 12

louisC6AEK
Participant
Participant

I have a few projects with over 100 views that I want to export to dwfx. 
The architect has ambient shadows switched on for all views!

 

Every time he sends me his model, I have to:

Open each view (30 sec)

Enable temporary view properties (7 sec)

Uncheck [x] Show Ambient shadows (22 sec)

FOR EACH VIEW!!!

 

One change to his project "costs" me 1.5 hours!

 

Please tell me there is an easier way to do this?

 

0 Likes
Message 4 of 12

emiliobier
Explorer
Explorer

I believe that in your case you can apply a template with only the "Shadows" option checked.

image.png

 

But in my case, I would like to turn the Ambient Shadows ON without relying on a template. That's because in my plugin I cannot assume that the user will have a specific template in his model.

 

@jeremytammik , first of all, thanks for all your work in your blog. It has been helping a lot.

There are any news from the development team? Or any ideas for a workaround?

 

Thanks!

0 Likes
Message 5 of 12

jeremytammik
Autodesk
Autodesk

Nope, I have not received any news on this.

 

I asked again for you now.

 

If you are serious about this request, please also add it as an API wish to the Revit Idea Station and ensure it gets many votes.

 

Thank you!

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 6 of 12

emiliobier
Explorer
Explorer

Tanks for the quick reply.

The need for the ability is somewhat important, but the change on the API won't solve my problem as many clients still use older versions of Revit.

 

I'm trying to think in a workaround for this issue, like storing a view template in the dll file is possible, but without success so far. Any suggestions that I can try?

 

In last case, I'll orient the user to turn on the ambient shadows for best results.

 

Cheers!

 

 

0 Likes
Message 7 of 12

jeremytammik
Autodesk
Autodesk

I heard back from the development team, and they confirm that there is currently no API access to this.

 

Therefore, in the long run, the Revit Idea Station wish list entry would be the way to go.

 

In the short run, I absolutely agree that requesting the user to turn on this setting is the easiest and most efficient way forward.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 8 of 12

franciscopossetto
Advocate
Advocate

Hi everyone,

 

Does anyone know if there have been any updates or changes in the recent versions of the API (2021+) that make this possible?

 

Thanks in advance.

Github:
https://github.com/franpossetto
0 Likes
Message 9 of 12

jeremy_tammik
Alumni
Alumni

I asked the development team for you. Did you check the Revit Idea Station?

  

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

b.rice8SNKZ
Explorer
Explorer

Hi Jeremy,

No, I haven't. I'll try that

0 Likes
Message 11 of 12

jeremy_tammik
Alumni
Alumni

The development team reply: Shadows might be a parameter of the view: GRAPHIC_DISPLAY_OPTIONS_SHADOWS. Ambient shadows setting is not exposed as far as I can see. We are looking into this further...

  

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

jeremy_tammik
Alumni
Alumni

The development team have now submitted an issue to expose this, REVIT-222419 [(Revit API) expose shadows and ambient shadows]. Please make a note of this number for future reference.

   

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