AnsweredAssumed Answered

Opendoc6: specified configuration not opened

Question asked by Christoph Engelhardt on Sep 6, 2017
Latest reply on Sep 6, 2017 by Adam Hoffman

Hi there,

 

I am writing an addin, that needs to open a document in a specific configuration. When I do:

 

     // open part

     string refmodel = "Part1.sldprt";

     string refconf = "New";

     ModelDoc2 swModel3D = iSwApp.OpenDoc6(refmodel, doctype, (int)swOpenDocOptions_e.swOpenDocOptions_Silent, refconf, ref fileerror, ref filewarning);

 

     // get active conf

     Configuration loadedconf = swModel3D.ConfigurationManager.ActiveConfiguration;

     Debug.Print(" :: Configuration loaded: " + loadedconf.Name);

 

     // show available confs

     string[] confs = (string[])swModel3D.GetConfigurationNames();

     for(int i=0;i<confs.Length;i++)

          Debug.Print(" :: Configuration " + i + ": " + confs[i]);

 

the Output is:

 

     :: Configuration loaded: Standard

     :: Configuration 0: Standard

     :: Configuration 1: New

 

Although the configuration named "New" is available, it is not loaded by the OpenDoc6 method. Any hints what I need to do to get OpenDoc6 to open the specified configuration?

 

Thanks in advance!

Chris

 

 

 

    

 

 

Outcomes