Page 1 of 1

CAD Import VCL & C++Builder

Posted: 28 Apr 2006, 06:12
by Beginner98x
Hi,

The block cannot be inserted with C++Builder and it embarrasses it.
Is there succeeding in BCB though it moves correctly in Delphi?

Posted: 05 May 2006, 15:27
by support
Hello,

The following lines describe how to get access to entities if block and inserts.

Code: Select all

TListBox *listboxBlocks;

void __fastcall TForm1::ReadCADEntities(TsgDXFEntity * Entity)
{
    ...
    <b>if</b> (FCADParams.Insert)
    {
      <b>if</b> (listboxBlocks->Items->IndexOfObject(FCADParams.Insert) == -1) // whether new Insert is in the list
      {
        //if Insert is not in the list
        TsgDXFInsert * vInsert = FCADParams.Insert; //get next Insert
        TsgDXFBlock * vBlock = (TsgDXFBlock *)(vInsert->Block); //get block of the new Insert
        listboxBlocks->Items->AddObject(vBlock->Name, (TObject *)vInsert); //add new Insert to the list
        /*
          TODO: Place code here.
        */
      ...
      }
     ...
    }
  ...
}
Sergey

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

Posted: 06 May 2006, 01:09
by Beginner98x
The reason for the problem is that I was not using PtXMat().
It did not notice because it had displayed it.
Thank you.