AddBlockfromTCADFile

<< Click to Display Table of Contents >>

Navigation:  MyCAD > Methods >

AddBlockfromTCADFile

public Boolean AddBlockfromTCADFile(String fileName,MyBlockMode blockMode)

 

Description:

 Add block from an exist tcad file, this file can be a template drawing.

 

Parameter:

 fileName: The tcad file that you want to add

 blockMode: The style of add a image

 

Return value:

 true: Add successfully

 false: Add unsuccessfully

 

Example:

 private void menuItem27_Click(object sender, System.EventArgs e)

 {

         openFileDialog1.InitialDirectory = Application.StartupPath;

         openFileDialog1.Filter = "TCAD drawing file(*.tcad)|*.tcad";

         openFileDialog1.FilterIndex = 1;

         if (openFileDialog1.ShowDialog() == DialogResult.OK)

         {

                 myCAD1.AddBlockfromTCADFile(openFileDialog1.FileName,MyBlockMode.Merge);

         }

 }