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 .
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!
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,
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... but until now I don't know how to get a specified object among many objects in w2d
best regards
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 ==========
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.
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 !
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 :D
best regards,
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 .
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).
Now I try to run with the option "Start without Debugging" (Ctrl + F5) and the errors don't appear. I read in some sites that the PDB files are temporary files to debug, aren't they?
Nevertheless I'm not seeing the output. What should appear? If I understand it would create a DWF file, right? Where?
Sorry for all these question but I don't find documentation about the examples.
hi,
pls check the staticorshared and debugorrelease option in the Configure.vsprops file when you build dwf toolkit. and make sure it suitable to your option "Debug (Read-write WChar DLL)"
Voicon, I open my Configure.vsprops that are inside the folder DWFToolkit-7.7\samples. It is below:
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="DWF Toolkit Libraries"
>
<UserMacro
Name="Platform"
Value="Win32"
/>
<UserMacro
Name="StaticOrShared"
Value="shared"
/>
<UserMacro
Name="DebugOrRelease"
Value="release"
/>
<UserMacro
Name="VCOutDir"
Value="vc8.0"
/>
<UserMacro
Name="binloc"
Value="bin"
/>
</VisualStudioPropertySheet>
I try to change the version to 10.00, after to static, and debug. But with same problems. When I "start without debugging", appears a screen and disappear soon. Is it correct? Thanks a lot for your responses.
hi,
so, currently which options you use in your configure.vsprops, also "debug read-write WChar DLL" is in use ?
as your errors, some dll files are miss, please check the path to dll file in Project properties
Can't find what you're looking for? Ask the community or share your knowledge.