How to change the name of petrel window programatically

161 views Asked by At

I am trying to make a petrel plugin which demands output in the form of function graphs and histograms. Can i name the function windows programatically?

1

There are 1 answers

0
zlu On BEST ANSWER

Yes you can rename a FunctionWindow using INameInfoFactory.

            INameInfoFactory nameFactory = (null != funcWindow) ? CoreSystem.GetService<INameInfoFactory>(funcWindow) : null;
            var nameInfo = (null != nameFactory) ? nameFactory.GetNameInfo(funcWindow) : null;
            if (null != nameInfo && nameInfo.CanChangeName)
            {
                nameInfo.Name = windowName;
            }