Determine What Library a Shape is Dragged From


Author
Message
Volvick Derose
Volvick Derose
Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)
Group: Forum Members
Posts: 71, Visits: 1
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
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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.

Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search