Hi everyone! I'm brand new to MPS and I already have a question. I'm trying to get the SNodeId from an existing file. I can right click the file, get the ID and 'Mock' it on the code and everything wi...

This is an auto-generated question from the MPS Slack community: Hi everyone! I'm brand new to MPS and I already have a question. I'm trying to get the SNodeId from an existing file. I can right click the file, get the ID and 'Mock' it on the code and everything will work... but I'm trying to do it through the code... I was trying to use node-ptr<Test> myVar = node-ptr/....../ . Is there a way to send a string with the filename and get the NodeId for that file ? Many thanks :slightly_smiling_face:
0
3 comments
What do you mean by a file? A node? Why do you need SNodeId? Why is node reference, as returned by node-ptr/.../, not enough? Having said that, you can get the SNodeId by using semantic downcast (`/`) on the node pointer and calling `getNodeId()`.
0
problem sorted!!! Thanks Slack user:U6K3FGW3U>
0
This is auto-generated question from the MPS Community Slack Workspace. If you want to comment on the question, do it from the Slack workspace
0

Post is closed for comments.