Yes, you can get the node/edges types from the metamodel using
graph.Model.NodeModel.GetType("MyNodeType")
- or -
graph.Model.EdgeModel.GetType("MyEdgeType")
Using the method graph.AddNode
you can add it to the graph and the added node is returned to which attribute assignments can be made.
All together, it looks like this:
newNode = graph.AddNode(graph.Model.NodeModel.GetType("MyNodeType"))
newNode.myAttribute = 42