Articles

procedure TForm1.Button1Click(Sender: TObject); 
var 
   LibManager: TLibManager; 
   AShape,BShape:TMyShape; 
begin 
   LibManager:=TLibManager.Create; 
   LibManager.LoadFromFile(ExtractFilePath(Application.ExeName)+'test.lib'); 
   with MyCAD1 do 
   BEGIN 
   AShape:=GetShapeById(AddUserDefineShapefromLib(LibManager, 'NoNameShape',100,200,MyCAD1)); 
   BShape:=GetShapeById(AddUserDefineShapefromLib(LibManager, 'NoNameShape',300,200,MyCAD1)); 
   MyCAD1.CreateLink('Line1',AShape,8,BShape,3); 
   MyCAD1.CreateLink('Line2',AShape,9,BShape,4); 
   MyCAD1.CreateLink('Line3',AShape,10,BShape,5); 
   end; 
   LibManager.Free; 
end;