How to drop by code an item from my own Library

Hello every body
To drop a resistor item from electricBlocks I use the code bellow:

procedure TFSmartProject.Button29Click(Sender: TObject);
var B: TResistorBlock;
B := TResistorBlock.Create(Self);
B.Diagram := atDiagram1;
B.Left := 100;
B.Top := 100;

My question is, how can I drop with a similar code an item from my library of added items?
MyLibrary is a folder which is created in the folder containing my exe application.
This item can be a a resistor Block with some modifications or even a groupn of blocks...
Please Help.

Use this:

  LibManager.LibraryByName('Default').FindItem('category', 'block').CreateControl(atDiagram1);

It works, like magic... Thank you very very much!!!!

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.