How to programmatically change the position of the sun autocad?
Hi,
Sorry, it is not possible to set the position of the sun using API.
Why is not that possible? It's possible, I did it.
By changing the time zone changes the position of the sun.
How to programmatically change the time of day in the visualization?
"By changing the time zone changes the position of the sun."
Did you try this in the AutoCAD UI or through API ?
AutoCAD surely changes the sun positiion when changing time zones but not when the time zone is changed using the API.
I did this MVS2010
<CommandMethod("Change_TIMEZONE")> _
Public Sub Change_TIMEZONE()
Application.SetSystemVariable("TIMEZONE", -11000)
Dim TIMEZONE As Integer = -11000
Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim i As Integer
For i = 0 To 23
' Some actions
TIMEZONE = TIMEZONE + 1000
acDoc.SendStringToExecute(".TIMEZONE " & TIMEZONE & " ", True, False, False)
Application.SetSystemVariable("TIMEZONE", TIMEZONE)
Next (i)
End Sub
How can I change the time to the sun's position changed more smoothly?
I meant the direct use of AcDbSun / Sun class methods to set the position.
SendStringToExecute should work as it uses the AutoCAD command.
Sorry if my previous reply misled you.
It's okay))))
It is even possible to programmatically change the time in the visualization?