Upgrade from 8.0 and earlier versions

  What's new >

Upgrade from 8.0 and earlier versions

Previous pageReturn to chapter overviewNext page

If you used the previous versions of CAD  VCL (8.0 and earlier), you may experience some issues concerning compatibility of your project and our library. This topic describes the possible compatibility issues and also shows how to solve them:

1)Error message 'Invalid typecast' appears in line where access to point from the list (points of POLYLINE, SPLINE etc.) is implemented. This error message is issued due to certain changes in storing this type of data as a result of adding 64-bit support. Now we are using TF2DPointList and TFPointList classes to maintain lists of points, instead of TList. The difference is that these classes store an array of points, not an array of pointers, like TList. For more information, see List Classes.

Note: If you want to use TList class to maintain lists of points, there is the function that converts an array of TF2DPoint or TFPoint type values to TList type value. For more information, see ConvertBaseListToList.

The difference between the previous versions and new ones (8.1 and later) in accessing point from the list is shown in the example below:

Previous versions

Version 8.1 and later

 

...

 

var

  vSpline: TsgDXFSpline absolute Sender;

  vControl, vFit: TFPoint;

begin

  vControl := PFPoint(vSpline.Controls[2])^;

  vFit := PFPoint(vSpline.Fit[2])^;

end;

 

...

 

 

...

 

var

  vSpline: TsgDXFSpline absolute Sender;

  vControl, vFit: TFPoint;

begin

  vControl := vSpline.Controls[2];

  vFit := vSpline.Fit[2];

end;

 

...

Solution: You need to make the certain changes in your code, similar to those in the example above.

2)Error message appears in line where deleting the entity from TsgDXFConverter is implemented.

Solution: The entity need to be deleted from the layout where it has been added. For example: vCADImage.Layouts[0].PaperSpaceBlock.RemoveEntity(vEntity) or vCADImage.CurrentLayout.PaperSpaceBlock.RemoveEntity(vEntity).

 

 

Go to CAD VCL Enterprise