Question

As can be seen in this post (How can I add a node type to the graph from within a script in booggie 2?) it's possible to add nodes/edges to the metamodel in booggie and change their attributes.

Is it also possible to change the attributes of already existing nodes (or edges) in a graph using a script?

Was it helpful?

Solution

I think you can get all nodes/edges of the current graph using the Nodes and Edges properties.

Try this out:

edgeList = graph.Edges
nodeList = graph.Nodes

Afterwards you can iterate over these lists for node in nodeList: and sort out the elements having the attributes you wanna change, e.g. if node.myAttribute == 42:.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top