Author Topic: set/read Sun Properties values  (Read 1486 times)

0 Members and 1 Guest are viewing this topic.

Eycki

  • Guest
set/read Sun Properties values
« on: July 26, 2012, 05:16:54 AM »
Hello,

Is there a possibility to access the sun properties from AutocAD with .NET?
I would like to put buttons on my tool palette to set geographical location, date and time. 
After setting this I want to read the calculated azimuth and altitude angles and use the values in my program.

Thx in advance!

Eycki

  • Guest
Re: set/read Sun Properties values
« Reply #1 on: July 26, 2012, 07:28:22 AM »
It seems that there are system variables for time, date, longitude, latitude and timezone...
Now need to know how to read azimuth and altitude angles

kaefer

  • Guest
Re: set/read Sun Properties values
« Reply #2 on: July 26, 2012, 07:38:16 AM »
It seems that there are system variables for time, date, longitude, latitude and timezone...
Now need to know how to read azimuth and altitude angles

Did you consult the Object Browser regarding AcDbMgd.dll? It appears that there's a SunId property for either Autodesk.AutoCAD.DatabaseServices.Viewport or Autodesk.AutoCAD.DatabaseServices.SkyBackground, and that the Sun object accessible in this way would provide both an Altitude and an Azimuth property.

Eycki

  • Guest
Re: set/read Sun Properties values
« Reply #3 on: July 26, 2012, 07:58:39 AM »
Thx for the help.  I found Autodesk.AutoCAD.DatabaseServices.Sun which includes all the parameters.