I can't get the value of Thickness
Moderators: SDS, support, admin
I can't get the value of Thickness
I am using DXF Import Dll in VB.
I create a DWG file with only one PLine object whose thickness is 10, But the value of the PLine is always 0 in VB.
Is it a bug?
I create a DWG file with only one PLine object whose thickness is 10, But the value of the PLine is always 0 in VB.
Code: Select all
Public Function DoPaint(ByRef EData As Data, Param As Long) As Long
Dim PreviousPen As Long
Dim Pen As Long
Pen = CreatePen(0, 0, EData.Color)
PreviousPen = SelectObject(Form1.hdc, Pen)
Debug.Print EData.Thickness '''' output is always 0
Select Case EData.Tag
Case DXF_LINE
DrawLine Form1.hdc, EData.Point1, EData.Point2
Case DXF_SOLID, DXF_3DFACE
DrawSolid Form1.hdc, EData, EData.Color
Case DXF_CIRCLE, DXF_ARC, DXF_ELLIPSE
DrawArc Form1.hdc, EData
Case DXF_POLYLINE, DXF_LWPOLYLINE
DrawPoly Form1.hdc, EData
Case DXF_SPLINE
DrawSpline Form1.hdc, EData
Case DXF_TEXT To DXF_ATTDEF
DrawText Form1.hdc, EData
Case DXF_POINT
DrawPoint Form1.hdc, EData.Point1, EData.Color
End Select
SelectObject Form1.hdc, PreviousPen
DeleteObject Pen
End Function
This bug is fixed. Please download corected CADImporterDLL and demo on download link:
http://www.cadsofttools.com/download/CADImporterDLL.zip
Sergey.
please post questions to the forum or write to support@cadsofttools.com
http://www.cadsofttools.com/download/CADImporterDLL.zip
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Hello,
Thickness that you set when editting an entity in AtuoCAD does not correspond to the Thickness that is being returned in Data.Thickness.
In Data.Thickness we return line's width (it corresponds to AutoCAD->LineWeight).
AutoCAD->LineWeight is a very complicated concept. It meens something like "duplication of the entity on OZ axis by the specified distance". That is why to simplify displaying entities, the DLL returns a set of entities with tag Data.Tag=DXF_POLYLINE ready for drawing. It meens that inside the DLL we build this copmlicated entity directly.
It works the same way with PolygonMesh.
We have found a bug in Demo C++ (demo Delphi works well). We need two days to fix this problem.
Thanks a lot for your help.
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Thickness that you set when editting an entity in AtuoCAD does not correspond to the Thickness that is being returned in Data.Thickness.
In Data.Thickness we return line's width (it corresponds to AutoCAD->LineWeight).
AutoCAD->LineWeight is a very complicated concept. It meens something like "duplication of the entity on OZ axis by the specified distance". That is why to simplify displaying entities, the DLL returns a set of entities with tag Data.Tag=DXF_POLYLINE ready for drawing. It meens that inside the DLL we build this copmlicated entity directly.
It works the same way with PolygonMesh.
We have found a bug in Demo C++ (demo Delphi works well). We need two days to fix this problem.
Thanks a lot for your help.
Sergey.
please post questions to the forum or write to support@cadsofttools.com
We are not sure if we are making our point clear. Is there something we are missing with your latest build? The thickness value we need access to is the value in DXF group code 39 which is per entity. Do you not have any customers out there that use this functionality? It is used extensively by our customers. Maybe this value needs to be an additional parameter in the dataset. I will email some more examples.
Hello all!
The problem with Thickness (value in DXF group code 39) has been solved. Updated CADImporterDLL is available on: http://www.cadsofttools.com/download/cadimporterdll.zip
<b>For VB</b>:
Parameter EData.Thickness contains Lineweight value for AutoCAD entities (value in DXF group code 370)
Sergey.
please post questions to the forum or write to support@cadsofttools.com
The problem with Thickness (value in DXF group code 39) has been solved. Updated CADImporterDLL is available on: http://www.cadsofttools.com/download/cadimporterdll.zip
<b>For VB</b>:
Parameter EData.Thickness contains Lineweight value for AutoCAD entities (value in DXF group code 370)
Sergey.
please post questions to the forum or write to support@cadsofttools.com