Save as DXF cadimport V7
Moderators: SDS, support, admin
Save as DXF cadimport V7
Hello Sergey.
The library CadImport V7 has resolved all my troubles, but today a new problem appeared.
using the fallowwing code:
The part that saves as DXF, works perfectly with the CadImport V6.3 but when I use it With CadImport V7, no file is created!!
How can I do please?
The library CadImport V7 has resolved all my troubles, but today a new problem appeared.
using the fallowwing code:
Code: Select all
private: void create_DXF(String^ pathTXT,String^ pathDXF,int W,int H)
{
CADImport::CADImage^ img = gcnew CADImport::CADImage();
CADImport::DRect size = CADImport::DRect(0,H,W,0);
img->Extents = size;
CADLayer^ cadLayer = gcnew CADLayer();
cadLayer->Name = "Textes";
cadLayer->LineWeight=-1;
cadLayer->Visibility=true;
cadLayer->Visible= true;
CADPolyLine^ entPolyline = gcnew CADPolyLine();
entPolyline->Color = Color::White;
CADVertex^ entVert = gcnew CADVertex();
entVert->Point = DPoint(0,0,0);
entPolyline->AddEntity(entVert);
entVert = gcnew CADVertex();
entVert->Point = DPoint(0,H,0);
entPolyline->AddEntity(entVert);
entVert = gcnew CADVertex();
entVert->Point = DPoint(W,H,0);
entPolyline->AddEntity(entVert);
entVert = gcnew CADVertex();
entVert->Point = DPoint(W,0,0);
entPolyline->AddEntity(entVert);
entVert = gcnew CADVertex();
entVert->Point = DPoint(0,0,0);
entPolyline->AddEntity(entVert);
entPolyline->Layer = cadLayercadre;
img->Converter->Loads(entPolyline);
img->Converter->OnCreate(entPolyline);
img->Converter->Entities->Add(entPolyline);
img->GetExtents();
CADImport::Export::DirectCADtoDXF::CADtoDXF^ cadexp = gcnew CADImport::Export::DirectCADtoDXF::CADtoDXF(img);
cadexp->SaveToFile(pathDXF);
How can I do please?
Re: Save as DXF cadimport V7
Hello.
In CAD Import .NET 7 you must call function img->InitialNewImage() after image creation:
otherwise you will receive exception and file doesn't created.
Alexander.
In CAD Import .NET 7 you must call function img->InitialNewImage() after image creation:
Code: Select all
CADImage^ img = gcnew CADImage();
img->InitialNewImage();
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: Save as DXF cadimport V7
Thank you Sergey, no file is created.
But I have two new trouble:
with library V7, when I try to create a "CadMText" , if I open the file created and I see the "TreeView" in "CADImport.NET EDITOR"
the CadMText entity is became a CadText.
Moreover I would like to use different Fonts for this CadMText, but I don't know how can I change it.
I use the Code to create CadMText:
thanks
But I have two new trouble:
with library V7, when I try to create a "CadMText" , if I open the file created and I see the "TreeView" in "CADImport.NET EDITOR"
the CadMText entity is became a CadText.
Moreover I would like to use different Fonts for this CadMText, but I don't know how can I change it.
I use the Code to create CadMText:
Code: Select all
CADMText^ entMText = gcnew CADMText();
entMText->Layer=cadLayer;
entMText->Text = texte;
entMText->Color = Color::FromArgb(R,G,B);
entMText->Point = DPoint(posX,posY,0);
entMText->Height = taille;
entMText->Loaded(img->Converter);
img->Converter->OnCreate(entMText);
img->Converter->Entities->Add(entMText);
Re: Save as DXF cadimport V7
Hello.
All entities of the image are represented In "TreeView" window of the Editor. CADMText includes one or more CADText entities, what is why you will see them in "TreeView" as branches from MText node. And if you want to choose font for CADMText, use CADMText.Style.FontName property.
Alexander.
All entities of the image are represented In "TreeView" window of the Editor. CADMText includes one or more CADText entities, what is why you will see them in "TreeView" as branches from MText node. And if you want to choose font for CADMText, use CADMText.Style.FontName property.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support