Profile Picture

How to update Shape port UniqueId with some database value??

Posted By Niranjan Singh 10 Years Ago

How to update Shape port UniqueId with some database value??

Author
Message
Niranjan Singh
Posted 10 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 49, Visits: 179
Scenario: Diagram saved in the database and i need to update the unique id of the Shape ports with the database values.

code snippet:
int portCount = shapeAdded.Ports.ChildrenCount(null);
for (int index = 0; index < portCount; index++)
{
NPort shapePort = shapeAdded.Ports.Children(null)[index] as NPort;

//assigning simobject unique id to nevron as if nevron port unique id
//is changed, connectors will be detached from the shape and can never be
//connected
shapePort.UniqueId = new Guid(portNode.SimUniqueID);
}





Similar Topics


Reading This Topic