Pjanssen
03-11-2012, 10:59 AM
I'm trying to get the INodeLayerProperties interface from an INode. In the SDK help it says:
static_cast<INodeGIProperties*>(node->GetInterface(NODELAYERPROPERTIES_INTERFACE))
Now I notice that it casts to INodeGIProperties, which I assume is a typo and should be INodeLayerProperties. But even without the cast, the GetInterface returns a null pointer.
I found that I could get an ILayer from an INode using
ILayer* aLayer = (ILayer*) node->GetReference(NODE_LAYER_REF);
But this I'm not sure if or how I could get an INodeLayerProperties object from that...
The reason I'm looking for the INodeLayerProperties is that I want to use the ILayerProperties interface to get all nodes on a layer. And I've also noticed some strange behavior when undoing an ILayer.AddToLayer(node) operation, so I want to see if it might work better with an ILayerProperties.AddNode.
Thanks!
static_cast<INodeGIProperties*>(node->GetInterface(NODELAYERPROPERTIES_INTERFACE))
Now I notice that it casts to INodeGIProperties, which I assume is a typo and should be INodeLayerProperties. But even without the cast, the GetInterface returns a null pointer.
I found that I could get an ILayer from an INode using
ILayer* aLayer = (ILayer*) node->GetReference(NODE_LAYER_REF);
But this I'm not sure if or how I could get an INodeLayerProperties object from that...
The reason I'm looking for the INodeLayerProperties is that I want to use the ILayerProperties interface to get all nodes on a layer. And I've also noticed some strange behavior when undoing an ILayer.AddToLayer(node) operation, so I want to see if it might work better with an ILayerProperties.AddNode.
Thanks!
