DWF

Reply
Contributor
binhpt
Posts: 14
Registered: ‎01-17-2012
Message 1 of 16 (1,176 Views)

Newbie in DWF Toolkit, get all objects in dwf file.

1176 Views, 15 Replies
01-17-2012 01:30 AM

I'm newbie in using dwf toolkit. So can someone tell me how to get all objects in dwf file (2d, 3d).

I was tried to load all object by DWFContent::load() but it fail with some file dwf.

Thanks for your reply .

Active Member
nathalia.sautchuk
Posts: 9
Registered: ‎01-05-2012
Message 2 of 16 (1,165 Views)

Re: Newbie in DWF Toolkit, get all objects in dwf file.

01-17-2012 11:08 AM in reply to: binhpt

I'm newbie too in DWF Toolkit. I did the download of DWFToolkit version 7.7 (bin).

I built sucessfully the SimpleEPlotWriter example as recommended in the the readmefirst.html. I'm using the Visual C++ 2010 Ultimate Edition.

But I'm in troubles to start the example. There are some errors:

'SimpleEPlotWriter.exe': Loaded 'C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-bin-win32\DWFToolkit-7.7\samples\DWFToolkit\SimpleEPlotWriter\shared_debug_vc10.0_Win32\SimpleEPlotWriter.exe', Symbols loaded.
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-bin-win32\DWFToolkit-7.7\samples\DWFToolkit\SimpleEPlotWriter\shared_debug_vc10.0_Win32\dwfcore_wt.1.7.0.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'SimpleEPlotWriter.exe': Loaded 'C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-bin-win32\DWFToolkit-7.7\samples\DWFToolkit\SimpleEPlotWriter\shared_debug_vc10.0_Win32\dwftk_wt.7.7.0.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-bin-win32\DWFToolkit-7.7\samples\DWFToolkit\SimpleEPlotWriter\shared_debug_vc10.0_Win32\w3dtk_wt.1.7.1555.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
The program '[4500] SimpleEPlotWriter.exe: Native' has exited with code 0 (0x0).

Someone have ideas what happening here?

My main objective is to code a software to read a DWF file too as binhpt is trying to do.

Thanks a lot!

Active Member
voicon
Posts: 8
Registered: ‎12-30-2011
Message 3 of 16 (1,158 Views)

Re: Newbie in DWF Toolkit, get all objects in dwf file.

01-18-2012 01:08 AM in reply to: nathalia.sautchuk

hi,

It's seem you r trying to run the complied dwf toolkit.

the compiled toolkit was built using default options ( in .vsprops), it may not suitable to your system)

I think you shoud download the source code of dwf toolkit and compile it on your system.

 

best regards,

 

Active Member
voicon
Posts: 8
Registered: ‎12-30-2011
Message 4 of 16 (1,154 Views)

Re: Newbie in DWF Toolkit, get all objects in dwf file.

01-18-2012 02:03 AM in reply to: binhpt

hi binhpt, 

About DWFContent::load(),

As I knowledge, this function just load the description (in xml file inside dwf ) about the objects in w2d package and other information ( also insde dwf file). 

 

I think you could run the ReadContentDefinition example to read the content.dwf file and get the output.

You can rename the file content.dwf in ReadContentDefinition example  to content.zip, after that you can extract the zip file, and check the content inside.

 

There are several xml file, you could compare the content of these xml files and the output of ReadContentDefinition example.

 

To get objects in w2d package, I think we need other function...:smileyvery-happy:  but until now I don't know how to get a specified object among many objects in w2d 

 

best regards

 

Active Member
nathalia.sautchuk
Posts: 9
Registered: ‎01-05-2012
Message 5 of 16 (1,150 Views)

Re: Newbie in DWF Toolkit, get all objects in dwf file.

01-18-2012 04:51 AM in reply to: voicon

voicon, thanks for your response.

 

I got the source code and build DWFCore, WhipToolkit, XAML, W3DToolkit, and DWFToolkit in this order (as suggested in readmefirst.html). Everything was built sucessfully in Visual Studio 10 Ultimate Edition.

 

But when I added the Simple EPlot Writer inside the solution and tried to build it I had some errors:

 

1>------ Rebuild All started: Project: SimpleEPlotWriter, Configuration: Current x64 ------
1>C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-src\DWFToolkit-7.7\samples\DWFToolkit\x64.props(4,5): warning MSB4011: "C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-src\DWFToolkit-7.7\samples\Configure.props" cannot be imported again. It was already imported at "C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-src\DWFToolkit-7.7\samples\DWFToolkit\DWFToolkitSamples.props (4,5)". This is most likely a build authoring error. This subsequent import will be ignored. [C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-src\DWFToolkit-7.7\samples\DWFToolkit\SimpleEPlotWriter\SimpleEPlotWriter_vc100.vcxproj]
1>C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-src\DWFToolkit-7.7\samples\DWFToolkit\shared.props(4,5): warning MSB4011: "C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-src\DWFToolkit-7.7\samples\Configure.props" cannot be imported again. It was already imported at "C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-src\DWFToolkit-7.7\samples\DWFToolkit\DWFToolkitSamples.props (4,5)". This is most likely a build authoring error. This subsequent import will be ignored. [C:\Users\KMA2\Desktop\DWF\DWFToolkit-7.7-src\DWFToolkit-7.7\samples\DWFToolkit\SimpleEPlotWriter\SimpleEPlotWriter_vc100.vcxproj]
1>Build started 18/01/2012 10:45:35.
1>_PrepareForClean:
1> Deleting file "shared_debug_vc10.0_x64\SimpleEPlotWriter.lastbuildstate".
1>InitializeBuildStatus:
1> Touching "shared_debug_vc10.0_x64\SimpleEPlotWriter.unsuccessfulbuild".
1>cl : Command line warning D9038: /ZI is not supported on this platform; enabling /Zi instead
1>cl : Command line warning D9007: '/Gm' requires '/Zi'; option ignored
1> SimpleEPlotWriter.cpp
1> stdafx.cpp
1> Generating Code...
1>LINK : fatal error LNK1104: cannot open file 'dwfcore_wt.1.7.0.lib'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:06.53
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


Active Member
voicon
Posts: 8
Registered: ‎12-30-2011
Message 6 of 16 (1,143 Views)

Re: Newbie in DWF Toolkit, get all objects in dwf file.

01-18-2012 03:07 PM in reply to: nathalia.sautchuk

hi,

 

It's seem you built dwf toolkit with "Read-Write Wchar", make sure you choose this option for all  DWFCore, WhipToolkit, XAML, W3DToolkit, and DWFToolkit.

 

And check the configuration in .vsprops ( static or shared/ platform/ debug or release/ vc version ) for suitable options.

Contributor
binhpt
Posts: 14
Registered: ‎01-17-2012
Message 7 of 16 (1,137 Views)

Re: Newbie in DWF Toolkit, get all objects in dwf file.

01-18-2012 05:05 PM in reply to: voicon

voicon,thanks for your response.

I have just get all properties in resource "Object Defination" and get all objects in w2d with "2D graphics stream". But my problem i want to add some thing into WT_Object of 2D Graphics stream, ex : "WT_ATTRIBUTE_URL",after that save it into new file (.dwf).

Is it impossible ?

 

Thanks !

Active Member
voicon
Posts: 8
Registered: ‎12-30-2011
Message 8 of 16 (1,134 Views)

Re: Newbie in DWF Toolkit, get all objects in dwf file.

01-18-2012 05:36 PM in reply to: binhpt

hi,

Sure, you can get the WT_Object and add something. but you need to write it out into new w2d package, then make new dwf file with that new w2d package ( because original dwf file can not be modified)

 

But the problem is how we can identify which WT_Object (which we desired to add...something). as you know, inside w2d package we have so many WT_Object. and also WT_Object is different to the "Object" defined by AutoCAD.

 

Ex. you want to add hyperlink into the pine line 1 ( the pine line you can see by using AutoCAD design viewer to open the dwf file -- and you can see many pine lines).

 

When you read w2d package and passthrough many pine lines....how we can specified pine line 1 ( which we desired to add hyperlink)....until now i don't know how to solve this problem :smileyvery-happy::smileyvery-happy:

 

best regards,

 

Contributor
binhpt
Posts: 14
Registered: ‎01-17-2012
Message 9 of 16 (1,127 Views)

Re: Newbie in DWF Toolkit, get all objects in dwf file.

01-19-2012 12:21 AM in reply to: voicon

I think WT_Object_node can resolve this problem , because with WT_Object_node you can group all WT_object into one node for add properties .

Active Member
nathalia.sautchuk
Posts: 9
Registered: ‎01-05-2012
Message 10 of 16 (1,116 Views)

Re: Newbie in DWF Toolkit, get all objects in dwf file.

01-19-2012 10:09 AM in reply to: voicon

voicon, thanks again for your response.

 

Your suggestion works in parts here. I selected the option "Debug (Read-write WChar DLL)" for all libraries and I can build the Simple EPlot Writer example correctly. But when I try to run (pressing F5) appears the following error:

 

'SimpleEPlotWriter.exe': Loaded 'C:\Users\KMA2\Documents\Visual Studio 2010\Projects\DWFToolkit-7.7\samples\DWFToolkit\SimpleEPlotWriter\shared_debug_vc10.0_Win32\SimpleEPlotWriter.exe', Symbols loaded.
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Users\KMA2\Documents\Visual Studio 2010\Projects\DWFToolkit-7.7\samples\DWFToolkit\SimpleEPlotWriter\shared_debug_vc10.0_Win32\dwfcore_wt.1.7.0.dll', Symbols loaded.
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'SimpleEPlotWriter.exe': Loaded 'C:\Users\KMA2\Documents\Visual Studio 2010\Projects\DWFToolkit-7.7\samples\DWFToolkit\SimpleEPlotWriter\shared_debug_vc10.0_Win32\dwftk_wt.7.7.0.dll', Symbols loaded.
'SimpleEPlotWriter.exe': Loaded 'C:\Users\KMA2\Documents\Visual Studio 2010\Projects\DWFToolkit-7.7\samples\DWFToolkit\SimpleEPlotWriter\shared_debug_vc10.0_Win32\w3dtk_wt.1.7.1555.dll', Symbols loaded.
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
'SimpleEPlotWriter.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
The program '[1088] SimpleEPlotWriter.exe: Native' has exited with code 0 (0x0).

 

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.