Dec 19, 2017, 4:28 PM

Hi @stephane-redon, sorry for my late response. When I add atoms, nothing happens, they are correctly added.

I have a visual model that displays arrow on atoms. It reads coordinates from a file and then displays arrows. My problem is that I would like to displays arrows when the user clicks on a button. I tried the way a structural model is added to the active layer programmatically but it does not work. Please, would mind helping me with it?

This is just an inspiration from how a structural model is added:

SBMVisualModel* visualModel = new SBMVisualModel();
visualModel->setName("VP_Arrows");

SAMSON::beginHolding("Display vp by arrows");

SEFleXibleVisualModel vModel; // this is my visual model
vModel.fileName = vp_file; // this is to set the coordinates file

//visualModel.display(); // I don't know if I need to call this method or not
visualModel->addChild(vModel); // add my visual model to the SBMVisualModel

visualModel->create();
SAMSON::getActiveLayer()->addChild(visualModel); // add to the active layer

If this is solved I think I could then display atoms' serial numbers

Thank you in advance.