DWF Viewer (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SetView() from javascript in Express

22 REPLIES 22
Reply
Message 1 of 23
hmp
711 Views, 22 Replies

SetView() from javascript in Express

In whip and volo, I could set the current view rectangle (SetAndDrawView) via javascript. In Express, I can get from the AdViewer object to an AdPageViewer object(via .Viewer - [aside - didn't see it mentioned in the doc, just using ole viewer]) but it gives me an IAdReaderViewer interface. I was hoping for an IAdPageViewer interface where I could try .SetView().

Is there a way in javascript with Express to set the current view/zoom rectangle?

thanks
22 REPLIES 22
Message 21 of 23
Anonymous
in reply to: hmp

This is excellent news! I have been hgoping (and agitating a little)
for this since the first AEV beta.

Michael Porter

"Jeffrey Klug \(Autodesk\)"
wrote:

>
>
The information you need is not available through
>the API, other than through the transform point method Ben mentioned, which will
>be implemented in the next AEV service pack due soon.

>

>style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
> I
> don't mind doing the conversion to EV's paper units. I just don't have enough
> information to go from the information in the dwf, like drawing units, to
> whatever EV's 'paper units' represent. Can you provide any information about
> how paper units are calculated so I can convert my coordinates to paper
>units?


Michael Porter Naval Architect / Boatbuilder
mporter at mp-marine.com
www.mp-marine.com
Cartography: www.cba-inst.org
Message 22 of 23
Anonymous
in reply to: hmp


Transform
point will work in VB, JavaScript, C++, C#, etc.



size=2>
 


Because
of your question I am wondering if you have some VB code that you would like the
JavaScript equivalent of.



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Should
I be concerned that the upcomming TransformPoint method won't actually work
from javascript but will be limited to vb and
vbscript?
Message 23 of 23
hmp
in reply to: hmp

No, I only have javascript code but there are language limitations in javascript that often make component methods unusable in javascript even when those methods work fine in vbscript which is yet more limited than vb, as is the case with numerous methods already in EV, whip, etc. For example, methods with ([out] double*) don't seem to work in javascript and my concern is that a TransformPoint( [in,out] double* x, [in,out] double *y, [in] int mode) would show up and not be usable to me in javascript. Thanks.

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

Post to forums  

Autodesk Design & Make Report