.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to programmatically change the position of the sun autocad?

6 REPLIES 6
Reply
Message 1 of 7
Febere
777 Views, 6 Replies

How to programmatically change the position of the sun autocad?

How to programmatically change the position of the sun autocad?

6 REPLIES 6
Message 2 of 7
Balaji_Ram
in reply to: Febere

Hi,

 

Sorry, it is not possible to set the position of the sun using API.



Balaji
Developer Technical Services
Autodesk Developer Network

Message 3 of 7
Febere
in reply to: Balaji_Ram

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?

Message 4 of 7
Balaji_Ram
in reply to: Febere

"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.

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 5 of 7
Febere
in reply to: Balaji_Ram

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?

Message 6 of 7
Balaji_Ram
in reply to: Febere

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.



Balaji
Developer Technical Services
Autodesk Developer Network

Message 7 of 7
Febere
in reply to: Balaji_Ram

It's okay))))

 

It is even possible to programmatically change the time in the visualization?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost