Start a new topic

FltXref help

ok, moving deeper into my script I want to clean out empty xref nodes.


So say you open master.flt, there are all the tiles(xrefs). Some are empty and some are hosting actual xrefs, Can the empty ones be removed?


db

g1

g0

g1

model_output0_1.flt                             model_output4_7.flt

empty                                                   extern(1x)


def RemoveEmptyXrefs(db,par,rec,userData):

    try:

        if mgIsCode (rec, fltXref):

            if (mgGetChild (rec) == 0:

                mgDelete (rec)


leaving at 0 does nothing, 1 deletes everything.


not sure whats next

1 Comment

oh the empty xref nodes are coming from previous project outputs. I guess i can just remember to clean before a build

Login to post a comment