Farsheed Ashouri Posted October 18, 2009 Share Posted October 18, 2009 Hi. as a newbie I want to use number of points in a group, in another popnet' source node. how can I get it? I read the documentation and I found a local value named N. but how can I use N? Thanks for your help in advanced. Quote Link to comment Share on other sites More sharing options...
graham Posted October 18, 2009 Share Posted October 18, 2009 You can get a list of points in a group from a node using the pointlist() expression. You can wrap that in an argc() expression to get the number. argc(pointlist("/obj/geo1/some_node", "my_group_name")) Quote Link to comment Share on other sites More sharing options...
Farsheed Ashouri Posted October 18, 2009 Author Share Posted October 18, 2009 Well, Thanks graham but I don't need list of points. I need number of points. Could you please show me how to get the number of points of a group and in general how to find another node's local variable value? Quote Link to comment Share on other sites More sharing options...
Farsheed Ashouri Posted October 18, 2009 Author Share Posted October 18, 2009 ok. I find that argc returns the number. but I cant get it work. could anyone prepare me a little working hip file? Quote Link to comment Share on other sites More sharing options...
graham Posted October 18, 2009 Share Posted October 18, 2009 As I said, you use the list of points in the group as an argument to argc() which counts the entries and gives you the number of them, aka number of points in the group. There is no direct expression that gives you the number of points in the group. Attached is an example. Also, it's not possible to access other nodes local variables. Local variables are LOCAL and can only be accessed from that node, which is why you have to use an expression. numpoints_in_group.hipnc Quote Link to comment Share on other sites More sharing options...
Farsheed Ashouri Posted October 19, 2009 Author Share Posted October 19, 2009 well, thanks. Also $NGRP helped me a lot. Cheers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.