Start a new topic

Removing a node from db based on mgGetCode(rec) == fltSwitch


I'm building this script from the ground up to remove switch nodes.  I am aware that I can do this safely in the PostWalk.

Here's the relevant conundrum:

code = mgGetCode(rec)

and I print that code, I get 362.  If I do this:

if code == fltSwitch:

   then this code executes.

What's going on, why does the print see this as 362?


1 Comment

This is expected. fltSwitch is a constant value identifying a switch node. The value of this constant is 362 in the kernel. mgGetCode of a switch rec will return 362, which is the same thing as the fltSwitch constant.
Login to post a comment