DWF Viewer

Reply
Contributor
edawgbrown
Posts: 18
Registered: ‎03-10-2009
Message 1 of 6 (804 Views)

DWF file not rendering in the DWF sheet properly

804 Views, 5 Replies
01-07-2010 12:51 PM
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.
Employee
herbert.he
Posts: 338
Registered: ‎03-05-2008
Message 2 of 6 (803 Views)

Re: DWF file not rendering in the DWF sheet properly

01-11-2010 05:00 PM 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.
Contributor
edawgbrown
Posts: 18
Registered: ‎03-10-2009
Message 3 of 6 (803 Views)

Re: DWF file not rendering in the DWF sheet properly

01-11-2010 05:46 PM 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.
Employee
herbert.he
Posts: 338
Registered: ‎03-05-2008
Message 4 of 6 (803 Views)

Re: DWF file not rendering in the DWF sheet properly

01-19-2010 06:27 PM 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.
Active Contributor
chadlk
Posts: 37
Registered: ‎11-13-2006
Message 5 of 6 (803 Views)

Re: DWF file not rendering in the DWF sheet properly

03-23-2010 08:27 AM 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
Employee
herbert.he
Posts: 338
Registered: ‎03-05-2008
Message 6 of 6 (803 Views)

Re: DWF file not rendering in the DWF sheet properly

03-25-2010 07:49 PM 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.
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.