CreateLink

<< Click to Display Table of Contents >>

Navigation:  MyCAD > Methods >

CreateLink

public Int64 CreateLink(String linkName,MyShape srcShape,Int32 srcLinkPtId,MyShape destShape,Int32 destLinkPtId)

 

Description:

 To create link line shape between source shape and dest shape.

 

Parameter:

 linkName: The link line's name

 srcShape: The source shape

 srcLinkPtId: The link point id

 destShape: The dest shape

 destLinkPtId: The link point id

 

Return value:

 Return value =-1,create link line unsuccessfully

 Return value >=0,create link line successfully,the value is the ShapeId of the link line

 

Example:

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

 {

         myCAD1.CreateLink("LinkLine",myCAD1.MyShapes[0],0,myCAD1.MyShapes[1],0);

 }