23 Aug 2021

Change Viewer settings

Apart from being able to check how certain API functions you are interested in are being used by the Viewer (as shown here) you may also want to know what API functions are used by the user interface of the Viewer.  

You can use the browser's debugging capabilities for that. If you want to see how the Environment is being changed when you select one of them in the user interface, you can simply check on the Event Listeners tab which function is listening to the click event. Then debug into it to find out what exactly it does, what functions it calls. In this case, you can see that it's calling the viewer.setLightPreset() function with the selected environment's index. See picture on top.

Related Article

Posted By

Adam Nagy

Follow @AdamTheNagy Adam Nagy joined Autodesk back in 2005 and has been providing programming support, consulting, training and evangelism to external developers. He started his career in Budapest, then worked in Prague for 3 years and now lives in South England, UK. At the moment focusing on Inventor and Fusion 360, plus cloud and mobile related technologies. Adam has a degree in Software Engineering and has...