Autodesk DWF Viewer
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
TransformP oint function with SrcType Drawing and DstType Screen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello,
I want to know in which unit are the coordinates I get as a result of calling the function TransformPoint.
Here is what I am doing (C# code):
object DstUX, DstUY, DstUZ;
PlotSection.TransformPoint(0, srcX, srcY, null, 2, out DstUX, out DstUY, out DstUZ);
int topLeft = Math.Abs((int)Math.Round(decimal.Parse(DstUX.ToStr
int topTop = Math.Abs((int)Math.Round(decimal.Parse(DstUY.ToStr
But I get coordinates that are not in the same unit as the coordinates I usually use when I am drawing something on the screen (i.e. I get DstUX = -14406 and DstUY = 9210, and my screen coordinates go from: 0 to 1280 and 0 to 770).
Thanks in advance.
Lucas
Re: TransformP oint function with SrcType Drawing and DstType Screen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you for your question.
The screen here is corresponding to the canvas of DWF Viewer control but not your screen. So the negative or larger coordinates means the source drawing is out of the canvas. You can zoom out your canvas and try it again.
Hope that helps.

Herbert He
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Re: TransformP oint function with SrcType Drawing and DstType Screen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you for the answer...
So basically what I need to do is tranform the coordinates to the ones I have on the screen.
For that I call 3 times to the method TransformPoint (to obtain the taget point, the TOP-LEFT point and the BOTTOM-RIGHT point of the current view) to be able to transform the coordinates axis and units.
The problem is that the second and third time I call to the TransformPoint method, I get the values as the first time, but I am sure that the values I give as parameter are differents. Do you know why is this happening? Or what I'm doing wrong?
Thanks in advance.
Lucas
Re: TransformP oint function with SrcType Drawing and DstType Screen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you for your question.
Please insure to use the same "SrcType" and "DstType" for your 3 times call. If it still not help, please attach your code here for us to investigate.

Herbert He
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Re: TransformP oint function with SrcType Drawing and DstType Screen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you Herbert
Find attached a fragment of my code. Please advice.
Regards.
Lucas
Re: TransformP oint function with SrcType Drawing and DstType Screen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you for your feedback.
What are exactly values of CurrentView and simpleDrawingView before your 3 times call? Please insure you got expected values for CurrentView and simpleDrawingView previously.

Herbert He
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Re: TransformP oint function with SrcType Drawing and DstType Screen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello,
I just verified and the variables CurrentView and simpleDrawingView have the expected values. Just in case I have replaced this variables for constant values and I got the same result. See below.
PlotSection.TransformPoint(0, 8.6472, 3.7193, 0, 2, out currentViewLimitRight, out currentViewLimitBottom, out unused);
Thank you!
Lucas
Re: TransformP oint function with SrcType Drawing and DstType Screen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you for your feedback.
Please upload your test .dwf file to this thread for me use to investigate.

Herbert He
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
