Nevron Forum

Determine What Library a Shape is Dragged From

https://www.nevron.com/Forum/Topic6982.aspx

By Volvick Derose 1 - Wednesday, September 26, 2012

I name my library document, however I am not able to determine what library a shape is dragged from. I keep getting null in my nodeinserted even.

I have something like that

myString = myShape.Library.Name;

however myShape is fine, but myShape.Library always null

I try to use the nDiagramElement, but not successful

so after inserting a shape, how can I determine what library that shape is dragged or inserted from
By Nevron Support - Monday, October 1, 2012

You cannot determine the library from which a shape is created, if it was dropped inside the drawing. This is because the Library reference returns a valid NLibraryDocument only if the shape resides inside a NMaster (i.e. is inside a library document). When drag and dropped the library creates a NLibraryDataObject and the drawing adapts this library data object to a NDrawingDataObject, with the help of its NDrawingDataObjectAdaptor. One way to achieve this is to assign a Tag to all the shapes that resides in your library.