Question

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?

Was it helpful?

Solution

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;
            }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top