 |
|
 |
Hi,
If you get version for C# please send me too,
sceleton@japan.com
thenks,
|
|
|
|
 |
|
|
 |
|
 |
Hi Omid Shahabi:
Thanks for your article and source code first. I've got a question here: Any data type of coordinate we read from DXF file is (double,double), but if we want draw all the entities to our own application on screen, all the coordinates should be convert to (int,int). thers is the question, how should we convert them?
I'ven read the source code, and get the the convert information from four macros, but just can not fully understand them, Especilly the concept of Units and PPU. Could you give me more information about how to convert them? Hope for your reply, Thanks. Here are defination of your four macros:
#define U2PX(units) pDrawing->View.WindowLeft + (int)((-pDrawing->View.ViewLeft + x+(units)*xScale) * pDrawing->View.PPU * pDrawing->View.ZoomLevel)
#define U2PY(units) pDrawing->View.WindowBottom - (int)((-pDrawing->View.ViewBottom + y+(units)*yScale) * pDrawing->View.PPU * pDrawing->View.ZoomLevel)
#define U2PXROT(xUnits,yUnits) pDrawing->View.WindowLeft + (int)((-pDrawing->View.ViewLeft + x+(xUnits*xScale*cos(Rotation*PI/180)-yUnits*yScale*sin(Rotation*PI/180))*1) * pDrawing->View.PPU pDrawing->View.ZoomLevel)
#define U2PYROT(xUnits,yUnits) pDrawing->View.WindowBottom - (int)((-pDrawing->View.ViewBottom + y+(xUnits*xScale*sin(Rotation*PI/180)+yUnits*yScale*cos(Rotation*PI/180))*1) * pDrawing->View.PPU pDrawing->View.ZoomLevel)
|
|
|
|
 |
|
 |
Hi!
Is there a way to get info about the entities like circle,polyline etc?
I need to know the coordinates of the polylines for instance.
How does CDrawing.Findentity work?
THX
|
|
|
|
 |
|
 |
I was trying to use this library but without including the whole bunch of files(not like in the test project) but with the single dll.I had several problems...
What you really need is>
You need to copy to your own directory only 6 files:
cadlib.cpp,cadlib.h, Drawingdef.h, DXFdef.h
from the Release library: the CadIO.lib , CadIO.dll.(If you dont have this build the CadIO.sln first)
Include cadlib.h , add to project these source and header files, in project settings->additional dependencies: cadio.lib
In VC++2005 It will throw 3 errors for cadlib.cpp:
error-> CDxfFileWrite::WriteParameter( int GroupCode, LPCTSTR Value )
{
ISLIBRARYLOADED();
return dxfWriteParamString( m_hDxf, GroupCode, Value );
} because there is a BOOL missing :
the correct form
BOOL CDxfFileWrite::WriteParameter( int GroupCode, LPCTSTR Value )
{...
...
After this it will work...
|
|
|
|
 |
|
 |
>>> the CadIO.lib , CadIO.dll.(If you dont have this build the CadIO.sln first)
Problem is VS2008 users will not be able to do so -build the CadIO.sln- and I couldn't find a walkaround yet may be you can help or post the shared dll file
modified on Thursday, December 30, 2010 5:52 PM
|
|
|
|
 |
|
 |
I dont want to include this bunch of library files like in test.cpp, I need only the dll so>
I have no clue how to use that CadIO.dll, what am I doing wrong?
1)
I compiled,built the library
2)
I copied only the CadIo.dll ,CadIO.lib, Cadlib.h , Drawingdef.h, DxfDef.h to my own directory.
3) Added the directories to my project + CADIO.lib to library
4) Included Cadlib.h
5) After I declare CDrawing class, the linker throws a nice >
error LNK2001: unresolved external symbol "public: __thiscall CDrawing::CDrawing(void)" (??0CDrawing@@QAE@XZ)
Why that?
There must be missing something...
|
|
|
|
 |
|
 |
This was really helpfull!
Greetings.
|
|
|
|
 |
|
 |
Hello Omid,
I was wondering if you were still making the CadIO.dll file available for download? I'd like to use it from VB6.
Thank You,
Mike
|
|
|
|
 |
|
 |
Good time of the day!!!
In example, drawing immediately all data. But how I draw all entity only one layer?
Thank you in advance for answer
|
|
|
|
 |
|
 |
What about unicode
Have you made the conversion??
I pass all the code using LPCTSTR and TCHAR but the dll's has to be modified...
It's has problems to open files...
DFXReadFile
in fopen function I can't convert form LPCTSTR to wchar_t
When I use the header atlbase.h the compiler give's me an error
Thanks
Mauricio Alfaro
|
|
|
|
 |
|
 |
Try to make Unicode release of CadIO.dll
|
|
|
|
 |
|
 |
Actually if you try to make an Unicode Release it will fail... Because the code doesn´t handle the TCHAR characters...
I think you`ll have to forget the dll´s of the project and generate a new project with all the source code as a static library....
and then convert all the char to TCHAR and make the apropiate conversions....
The main problem could be in open the files, read and write data....
So it will take some work to do this....
Cheers
Mauricio Alfaro
|
|
|
|
 |
|
 |
Do you work on this problem?
|
|
|
|
 |
|
 |
Not yet, but I saw the code already....
The problem has a solution... I´ll fix it soon...
Put this code as a dll, is a terrible mistake, drawing files need's speed, especially large files.
The autor should post this sample as a static library, it will be easy to fix the bugs and problems too...
Mauricio Alfaro
|
|
|
|
 |
|
 |
I agree with you! Let me know when you make some progress on it.
|
|
|
|
 |
|
 |
Ok, I had some time today to look at this problem. I made a Unicode Release of “CadIO.dll” and Unicode Release of “Test.exe” . Now it works!!!!!!!!
Note: I am using Visual Studio 2008.
Cheers !!!!!!
|
|
|
|
 |
|
 |
That's good, this sounds like you are a genius, how many minutes did it took ?
---------
Antonio
|
|
|
|
 |
|
 |
I will be honest it took me a day but it pays off.
Veni
|
|
|
|
 |
|
 |
i have a dxf file which have the sqrt sigle.
and the sqrt sigle is draw line on the screen.
the number under the sigle is a text .
this lib can not be fit the number and sqrt very well.
how dose i do with it?
from vevi
|
|
|
|
 |
|
 |
Can you send me your dxf file.
I will try to fix the problem.
Pars Technology Development Co.
|
|
|
|
 |
|
 |
I want to know, how you can draw an elliptical arc with Entities :"Ellipse" ?
And how using the start parameter (41) and the End parameter (42), to find the startAngle and sweep Angle
Thanks.
|
|
|
|
 |
|
 |
Is there a commercial license available for cadlib ???
If yes, where can I find the licensing models ?
|
|
|
|
 |
|
 |
How can I declare this dll in vb6??? I've tried add a reference but it's not possible!!! I'm a beginer and if somenone can help me I apreciate... Can I declare the dll function by this method?: Private declare Function FUNCTION_NAME lib "CadiIO.dll" (blabla as long,...) thanks a lot
|
|
|
|
 |
|
 |
??? ??? ?????? ??? ?????? ?? ?? ?????? ??? ?? ?? ??? ???
|
|
|
|
 |