Loss of Functionality in 5.25

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
edbored
Posts: 20
Joined: 26 Jul 2005, 00:15
Location: Canada

Loss of Functionality in 5.25

Post by edbored » 24 Oct 2006, 05:12

I've been using CADImportVCL with Report Builder for some time now.

I managed to get everything working nicely, including "IsWithoutBorder" with Report Builder's TppImage.

(
also see:
http://www.soft-gold.ru/forum/topic.asp?TOPIC_ID=102
and
http://www.soft-gold.ru/forum/topic.asp?TOPIC_ID=103
)

Since upgrading to 5.25, calling

TsgDWGDrawing(ppImage1.Picture.Graphic).IsWithoutBorder:=true;

has no effect. I re-installed the previous version (from 2005/08/24), and it functions perfectly.

For now I can keep using earlier version, but I imagine this could cause strange problems for other users.

Cheers,
EdB

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

Post by support » 24 Oct 2006, 10:45

Hello,

We have tested CADImportVCL available on: http://www.cadsofttools.com/download/cadimportvcl.zip. Property <b>TsgDWGImage.IsWithoutBorder</b> does work.

Please check the following code with the library:

Code: Select all

<b>unit</b> Unit1;

<b>interface</b>

<b>uses</b>
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DWG, StdCtrls, ExtCtrls, SGImage;

<b>type</b>
  TForm1 = <b>class</b>(TForm)
    Panel1: TPanel;
    sgImage1: TsgImage;
    btnOpen: TButton;
    btnBorderOnOff: TButton;
    <b>procedure</b> btnOpenClick(Sender: TObject);
    <b>procedure</b> btnBorderOnOffClick(Sender: TObject);
  <b>private</b>
    <font color="blue">{ Private declarations }</font id="blue">
    FImg: TsgDWGImage;
  <b>public</b>
    <font color="blue">{ Public declarations }</font id="blue">
  <b>end</b>;

<b>var</b>
  Form1: TForm1;

<b>implementation</b>

{$R *.dfm}

<b>procedure</b> TForm1.btnOpenClick(Sender: TObject);
<b>begin</b>
  sgImage1.LoadFromFile(<font color="blue">'c:\BorderTest.dwg'</font id="blue">);
  <b>if</b> sgImage1.Picture.Graphic <b>is</b> TsgDWGImage <b>then</b>
    FImg := TsgDWGImage(sgImage1.Picture.Graphic)
  <b>else
  begin</b>
    FImg := <b>nil</b>;
    Exit;
  <b>end</b>;
  sgImage1.Align := alClient;
<b>end</b>;

<b>procedure</b> TForm1.btnBorderOnOffClick(Sender: TObject);
<b>begin</b>
  FImg.IsWithoutBorder := <b>not</b> FImg.IsWithoutBorder;
<b>end</b>;

<b>end</b>.
If the problem still persists please send us your file for testing.

Sergey.

please post questions to the forum or write to support@cadsofttools.com

edbored
Posts: 20
Joined: 26 Jul 2005, 00:15
Location: Canada

Post by edbored » 24 Oct 2006, 11:06

Hi Sergey,

I know - I tested with sgImage and even by loading into a TImage before posting here (but thank you anyway for supplying more test code). It works with TsgImage and TImage.

The problem is I've written a lot of code around a module that uses IsWithoutBorder with Report Builder's TppImage component. It *does* work with the previous version. When I install 5.25 it does *not* work.

Setting BackgroundColor, DefaultColor, DrawMode - all that works, as does GetExtents. As far as I can tell, only IsWithoutBorder now fails with Report Builder TppImage (TppImage is NOT TImage).

It's not just one file - it's *every* file.

If you like, I can send you two PDF files (created from Report Builder) showing how the same drawing appears differently when I use the two different versions of CADImportVCL.

If you check out:

http://www.soft-gold.ru/forum/topic.asp?TOPIC_ID=102
and
http://www.soft-gold.ru/forum/topic.asp?TOPIC_ID=103

you'll see that we actually got this to work some time ago, and I documented how to use CADImportVCL with Report Builder. This no longer works 100% when using 5.25...


Cheers,
EdB

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

Post by support » 24 Oct 2006, 17:19

OK!

Thank you for the explanations. We will consider this problem and inform you when the solution will be found.

Sergey.

please post questions to the forum or write to support@cadsofttools.com

edbored
Posts: 20
Joined: 26 Jul 2005, 00:15
Location: Canada

Post by edbored » 24 Oct 2006, 21:03

I looked at their source for TppImage:

TppImage = class(TppCustomImage)
...
published
property Picture;
...
end;

TppCustomImage (TppCustomComponent)
...
FPicture: TPicture;
...
Public
property Picture: TPicture read GetPicture write SetPicture;
...
end;


function TppCustomImage.GetPicture:TPicture;
begin
Result:= FPicture;
end;

procedure TppCustomImage.SetPicture(aPicture: TPicture);
begin
FPicture.Assign(aPicture);
PictureChanged(Self);
end;


"PictureChanged" just tests for component in design or other mode, checks for "autosize" (which I don't use so code ignored), then does a few windows messaging things, some paint/invalidate things - nothing that should change size values.

Hope that helps!

Cheers,
EdB

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

Post by support » 17 Nov 2006, 17:30

Hello!

This is our bug.
It will be solved in the next version of the library.

Sergey.

please post questions to the forum or write to support@cadsofttools.com

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

Post by support » 20 Apr 2007, 19:34

Hello!

<b>CAD Import VCL</b> v.6.1 is available at: http://www.cadsofttools.com/download/cadimportvcl.zip

Sergey.

Please post questions to the forum or write to support@cadsofttools.com

Post Reply