get Revits location relative to the screen

get Revits location relative to the screen

Anonymous
Not applicable
1,052 Views
5 Replies
Message 1 of 6

get Revits location relative to the screen

Anonymous
Not applicable

Hi,

 

Is there any way to get the x and y coordinates of current Revit application relative to the screen? I want to be able to display a form and position it to where Revit is. Thanks!

0 Likes
Accepted solutions (1)
1,053 Views
5 Replies
Replies (5)
Message 2 of 6

saikat
Autodesk
Autodesk
Accepted solution

Hi:

 

The Revit API does not provide any information on the location/coordinates of the Revit application on the screen. To get this info, I would recommend checking the MSDN for Windows generic API specific questions and how to extract the coordinates of forms, applications from the screen.

 

regards

Saikat 



Saikat Bhattacharya
Senior Manager - Technology Consulting
Message 3 of 6

Anonymous
Not applicable

Thanks. I finally figured it out. 🙂

0 Likes
Message 4 of 6

saikat
Autodesk
Autodesk

Great. So I am assuming you are using the Windows API and nothing specific to Revit API.. Am I correct ?



Saikat Bhattacharya
Senior Manager - Technology Consulting
0 Likes
Message 5 of 6

Anonymous
Not applicable

Yes. I have to import InteropServices and define GetWindowRect to make it work. Spent a couple of hours looking over the internet... Thanks for your help. 🙂

0 Likes
Message 6 of 6

saikat
Autodesk
Autodesk

Awesome! Glad you were able to resolve your query on your own.

 

Good luck!

regards

Saikat



Saikat Bhattacharya
Senior Manager - Technology Consulting
0 Likes