(API) node number

(API) node number

Anonymous
Not applicable
862 Views
7 Replies
Message 1 of 8

(API) node number

Anonymous
Not applicable

I can not get the correct node number if the node numbering is not regular.

 

Dim RN As RobotNodeCollection

Dim inode As IRobotNode

Dim nodeid as integer

Set RN = robapp.Project.Structure.Nodes.GetAll

Set inode = RN.Get(11)

nodeid = inode.count

 

the nodeid is not correct if the node numbering is not regular. The 11th node is 15 in my model but in API it gives me 11.

 

 
 
0 Likes
863 Views
7 Replies
Replies (7)
Message 2 of 8

Rafal.Gaweda
Autodesk Support
Autodesk Support

HI @Anonymous 

 

I think You should use it in correct way:

nodeid = inode.Number

So example loop to get all nodes numbers

for i=1 to RN.Count
Set inode = RN.Get(i)
nodeid = inode.Number
next i

 



Rafal Gaweda
0 Likes
Message 3 of 8

Anonymous
Not applicable

still does not work.  "inode.Number" still gives me  11 for 11th node although the correct id is 12.  I attached the numbers of my nodes.

0 Likes
Message 4 of 8

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous 

 

See below

inode.jpg



Rafal Gaweda
0 Likes
Message 5 of 8

Anonymous
Not applicable

Thanks for your answer but in my code it does not work. I am using v15.

for 11th node it still gives 11 as the node number . see my code in the attachment.

0 Likes
Message 6 of 8

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous 

 

See below

nnode.jpg



Rafal Gaweda
0 Likes
Message 7 of 8

Anonymous
Not applicable

then it means node 11 may be calculation node in my model. Is nodes.Getall effective also for calculation nodes ?

because in my node table there is no node 11. I suspect it is a calculation node. 

0 Likes
Message 8 of 8

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous 

 

Yes.

 



Rafal Gaweda
0 Likes