I can't get the value of Thickness

Discuss and ask questions about CAD DLL (CAD Image DLL, CAD Importer DLL).

Moderators: SDS, support, admin

Post Reply
Li Yunbo
Posts: 5
Joined: 07 May 2005, 18:13

I can't get the value of Thickness

Post by Li Yunbo » 07 May 2005, 18:31

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.

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
Is it a bug?

Li Yunbo
Posts: 5
Joined: 07 May 2005, 18:13

Post by Li Yunbo » 08 May 2005, 06:06

For the same DWG file, In Demo for VB, The CADImageDLL shows the correct thickness of all the lines, but the CADImporterDLL losts the thickness inforamtion of all the lines.

support
Posts: 3254
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 12 May 2005, 19:10

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

LarryE
Posts: 3
Joined: 09 Jan 2006, 20:25
Location: USA

Post by LarryE » 09 Jan 2006, 20:26

I am still seeing a zero value for thickness. Is there still a problem?

LarryE
Posts: 3
Joined: 09 Jan 2006, 20:25
Location: USA

Post by LarryE » 09 Jan 2006, 21:22

Is it possible that this was fixed for VB only? We run VC. We sent emails about this problem last Friday, but have not received any information yet. It really has us stuck at this point. Do we need an even newer version?

support
Posts: 3254
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 10 Jan 2006, 19:45

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

LarryE
Posts: 3
Joined: 09 Jan 2006, 20:25
Location: USA

Post by LarryE » 11 Jan 2006, 22:07

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.

support
Posts: 3254
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 01 Aug 2006, 15:34

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

Post Reply