How to join two files?

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

Moderators: SDS, support, admin

DarkEternal
Posts: 26
Joined: 23 Feb 2009, 12:30

Re: How to join two files?

Post by DarkEternal » 16 Apr 2009, 11:07

But I dont know which cad editor they use but I make program for this file format.
Just I need to find points from these files.
Now I think that they can put colored points for finding.
For Example Can Ifind blue, green ext. points from file?

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

Re: How to join two files?

Post by support » 16 Apr 2009, 11:36

CAD Import VCL allows finding points in a drawing. But it works in the only case - these points should exist. You sent us some CGM (this is not AutoCAD file format) files which does not contain any point.
For Example Can I find blue, green ext. points from file?
Yes, you can. But file should contain these points at first.

Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

DarkEternal
Posts: 26
Joined: 23 Feb 2009, 12:30

Re: How to join two files?

Post by DarkEternal » 16 Apr 2009, 11:38

Yes, I know.
I will say them to put these points.
Can you send me example to find that colored points?

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

Re: How to join two files?

Post by support » 16 Apr 2009, 12:25

Here it is:

Code: Select all

procedure TForm1.btnFindPointByColorClick(Sender: TObject);
var
  I: Integer;
  vPoint: TsgDXFPoint;
begin  
  for I := 0 to TsgCADImage.Converter.Counts[csEntities] - 1 do
  begin
    if TsgCADImage.Converter.Sections[csEntities].Entities[I] is TsgDXFPoint then
    begin
      vPoint := TsgDXFPoint(TsgCADImage.Converter.Sections[csEntities].Entities[I]);
      if vPoint.Color = clRed then
        ShowMessage('Red point exists.');
    end;
  end;
end;
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

DarkEternal
Posts: 26
Joined: 23 Feb 2009, 12:30

Re: How to join two files?

Post by DarkEternal » 16 Apr 2009, 17:11

They send me new colored file.
I try your code but can not find point.
When I zoom cgm file by Cad Import Vcl, it looks like something wrong.
They use Catia.

I send you cgm file and zooming pic. with email.

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

Re: How to join two files?

Post by support » 16 Apr 2009, 17:25

We have received it. We will answer you soon.

Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

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

Re: How to join two files?

Post by support » 20 Apr 2009, 14:32

It is necessary to search TsgDXFArc objects with your file:

Code: Select all

procedure TForm1.btnGetCenterHatchClick(Sender: TObject);
var
  I: Integer;
  vArc: TsgDXFArc;
  vEnt: TsgDXFEntity;
begin
  for I := 0 to TsgCADImage.Converter.Counts[csEntities] - 1 do
  begin
  vEnt := TsgDXFEntity(TsgCADImage.Converter.Sections[csEntities].Entities[I]);
    if vEnt is TsgDXFArc then
    begin
      vArc := TsgDXFArc(TsgCADImage.Converter.Sections[csEntities].Entities[I]);
      if (vArc.Color = clBlue) or (vArc.Color = clGreen) then
        ShowMessage('Cross point exists.'); //vArc.Point - this point contains required coordinates     
    end;
  end;
end;
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply