This content has been marked as final. Show 6 replies
For PDFs at least, entity.getPoint().x / fileInfo.getInsertion().dpi returns the offset.
Please cam someone advise on dwg and doc format? Thanks.
Please cam someone advise for vector formats - dwg/dwf and doc/docx?
Have you tried VueBean.getPageSize()?
It should be in world coordinates.
Please note that vector files (including PDF) have the Y axis pointing up.
You can also use convert between client and world coordinates by using:
VueBean.clientToWorld() and VueBean.worldToClient().
Thanks for your help, but we could do with more information.
Do you have any chunks of sample code? We tried with DWF but the dimensions did not match those on the 'Properties' screen, and there was no clue on how to get whether the size is mm or inches?
There are thee types of coordinates used by AutoVue:
1) World coordinates: these are the coordinate space that the drawing or model is represented in the file format.
2) Device coordinates: these are pixel coordinates relative to the client's rendering area.
3) Physical coordinates: these are in mm or inches and are displayed in the AutoVue UI (status bar, measure tool and properties dialog).
I have shown you how to convert between the first two in my previous reply.
To convert between world and phyical coordinates, you could use the PAN_CtlFileInfo.Ins class (insertion information).
Multiply by VueBean.getFileInfo().getInsertion().scale and possibly subtract the offset too (before or after the multiplication, I didn't verify).
The result will be in physical coordinates that are in the units and can be looked up in the Constants class.
For example, PDF world coordinates are usually in the thousands, but show as inches (8.5x11) in the UI.
I hope this helps.