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

DWF file not rendering in the DWF sheet properly

5 REPLIES 5
Reply
Message 1 of 6
edawgbrown
1629 Views, 5 Replies

DWF file not rendering in the DWF sheet properly

Using C# and the AxExpressViewerDll control. I am trying to set the sourcepath to a local DWF file. I am using the OnEndLoadItemEventHandler to do this:

private void DwfViewer_OnEndLoadItem(object sender, AxExpressViewerDll.IAdViewerEvents_OnEndLoadItemEvent e)
{

string strItem = e.bstrItemName;
if (strItem == "DOCUMENT")
{
DwfViewer.SourcePath = "C:\\Data\Test.dwf";
}
}

The file does load but it is shown offset in the viewer instead of filling up the Canvas. This only happens using the OnEndLoadItemEventHandler as shown above. If I set the sourcepath after the control is already completed it renders properly. I have attached an image of the offset DWF in the control.
5 REPLIES 5
Message 2 of 6
herbert.he
in reply to: edawgbrown

Thank you for your question.
Please use the API ECompositeViewer.IAdECompositeViewer.SourcePath to set the sourcepath directly instead of OnEndLoadItemEventHandler.
Please refer to the ADR API documentation for more information.
Any further questions please let me know.
-Herbert



Herbert He
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Message 3 of 6
edawgbrown
in reply to: edawgbrown

The problem is you cannot set the sourcepath until the AxCExpressViewerControl has completely loaded. We are launching a popup window which opens a Windows Presentation Foundation (WPF) window. If I try to set the source path directly it crashes because the AxCExpressViewerControl is in an invalid state. If you look at the ViewerEvents.OnEndLoadItem Event in the API docs you will see how it describes being able to set the source path within this event. Again it does work its just the DWF is placed offset in the canvas as shown in the previous post attachment.

Thanks so much for the help and let me know if you know of anything else.
Message 4 of 6
herbert.he
in reply to: edawgbrown

Thank you for your feedback.

Could you provide a test application with test file that caused this issue so that we can reproduce and investigate it?

-Herbert


Herbert He
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Message 5 of 6
chadlk
in reply to: edawgbrown

I am having the same issue's. Map 2008 has no issue's, but when I upgraded to 2010 it seems to do this to some of my maps as well. It zooms to a specific spot instead of the entire drawing. So when you open a .dwf that was published it is zoomed way in or off tot he side instead of actually coming in as designed in the setup process.

Thanks

Chad Kersten
Minot, ND Edited by: chadlk@srttel.com on Mar 23, 2010 10:27 AM
Message 6 of 6
herbert.he
in reply to: edawgbrown

Thank you for your question.

Your question seems a DWF publisher issue of Map 3D. I suggest that you can post your question in AutoCAD Map 3D Forum.

Thank you for your supporting Autodesk.

-Herbert



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

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

Post to forums  

Autodesk Design & Make Report