CAD importer SDK DLL VB
Moderators: SDS, support, admin
CAD importer SDK DLL VB
I have to extract the layer, the label, the text attribute question, etc of attributes bloc from a dwg using Visual Basic.
I tried to use the demo DXF.DLL, (modifiing your demoVB script) but:
- I can"t see label and text attribute question in the Structure recovered by DXFENUM.
-The layer and the text value are filled with "?"
Is it because it 's demo DLL ?
I tried to use the demo DXF.DLL, (modifiing your demoVB script) but:
- I can"t see label and text attribute question in the Structure recovered by DXFENUM.
-The layer and the text value are filled with "?"
Is it because it 's demo DLL ?
All functions of DXF.dll return a pointer to ANSI string.
Visual Basic works with Unicode strings, it does not support PChar directly.
It is necessary to convert the string by StrConv function with vbUnicode parameter to see correct text.
For example:
' Dim S As String
S = StrConv (EData. Text, vbUnicode)
If the trouble still exists please, inform us when and how exactly described mistake occurs and the version of your Visual Basic, operating system and DXF.dll.
Sergey
please post questions to the forum or write to support@cadsofttools.com
Visual Basic works with Unicode strings, it does not support PChar directly.
It is necessary to convert the string by StrConv function with vbUnicode parameter to see correct text.
For example:
' Dim S As String
S = StrConv (EData. Text, vbUnicode)
If the trouble still exists please, inform us when and how exactly described mistake occurs and the version of your Visual Basic, operating system and DXF.dll.
Sergey
please post questions to the forum or write to support@cadsofttools.com
Only three fields has to be converted. They are EData.Layer, EData.Text and EData.FontName.
Sergey
please post questions to the forum or write to support@cadsofttools.com
Sergey
please post questions to the forum or write to support@cadsofttools.com
I'd like to know if the struc _DXFDATA will be change in the next version to add the ATTRIBUTE blocs fields like .label and .message and some the other fields concerned.
Here is the DXFDATE struct that is in my DXF.DLL :
typedef struct _DXFDATA {
WORD Tag;
WORD Count;
WORD TickCount;
BYTE Flags;
BYTE Style;
int Dimension;
LPDXFPOINT DashDots;
int DashDotsCount;
int Color;
LPVOID *Ticks;
float Thickness;
float Rotation;
char* Layer;
char* Text;
HANDLE Handle;
DXFPOINT Point1;
DXFPOINT Point2;
DXFPOINT Point3;
DXFPOINT Point4;
union {
struct {
float Radius;
float StartAngle;
float EndAngle;
float Ratio;
} Arc;
struct {
HANDLE Block;
DXFPOINT Scale;
} Blocks;
struct {
float FHeight;
float FScale;
float RWidth;
float RHeight;
BYTE HAlign;
BYTE VAlign;
} Text;
LPDXFPOINT *PolyPoints;
} DATA;
} DXFDATA, *LPDXFDATA;
Thanks a lot for helping me.
Here is the DXFDATE struct that is in my DXF.DLL :
typedef struct _DXFDATA {
WORD Tag;
WORD Count;
WORD TickCount;
BYTE Flags;
BYTE Style;
int Dimension;
LPDXFPOINT DashDots;
int DashDotsCount;
int Color;
LPVOID *Ticks;
float Thickness;
float Rotation;
char* Layer;
char* Text;
HANDLE Handle;
DXFPOINT Point1;
DXFPOINT Point2;
DXFPOINT Point3;
DXFPOINT Point4;
union {
struct {
float Radius;
float StartAngle;
float EndAngle;
float Ratio;
} Arc;
struct {
HANDLE Block;
DXFPOINT Scale;
} Blocks;
struct {
float FHeight;
float FScale;
float RWidth;
float RHeight;
BYTE HAlign;
BYTE VAlign;
} Text;
LPDXFPOINT *PolyPoints;
} DATA;
} DXFDATA, *LPDXFDATA;
Thanks a lot for helping me.
Could you please send to us the file that includes such entities as ".label and .message".
Official Autodesk DXF Reference does not describe them.
Sergey
please post questions to the forum or write to support@cadsofttools.com
Official Autodesk DXF Reference does not describe them.
Sergey
please post questions to the forum or write to support@cadsofttools.com
I didn't know english names of those field and try to translate them from french.
After researches, it seemes that they 're named :
- Tag
- Prompt
- Default
- Value
- ...
I found infos at :
http://usa.autodesk.com/adsk/servlet/it ... ID=2475176
Are those elements can be recovered with your DXF.DLL ?
(There is already a Tag field in your struct, but as it is WORD, instead of STRING, i dont think it is the one i m looking for)
After researches, it seemes that they 're named :
- Tag
- Prompt
- Default
- Value
- ...
I found infos at :
http://usa.autodesk.com/adsk/servlet/it ... ID=2475176
Are those elements can be recovered with your DXF.DLL ?
(There is already a Tag field in your struct, but as it is WORD, instead of STRING, i dont think it is the one i m looking for)
Hi,
In the closest plans we are not going to change DXFDATA globally but we are working with the adding GlobalWidth for PLine to DXFDATA using its current opportunities.
Sergey.
please post questions to the forum or write to support@cadsofttools.com
In the closest plans we are not going to change DXFDATA globally but we are working with the adding GlobalWidth for PLine to DXFDATA using its current opportunities.
Sergey.
please post questions to the forum or write to support@cadsofttools.com