AnsweredAssumed Answered

Robust get ModelDoc using file and config name

Question asked by Michael Caulton on Nov 5, 2018
Latest reply on Nov 5, 2018 by Artem Taturevych

What is the most robust method to get the ModelDoc data if you have access to the file and configuration name and the assembly containing the  file is active in a SW window but no other SW windows are active?

 

I have been use the lines below but sometime the "GetOpenDocument" returns nothing.

 

Dim swModel As IModelDoc2 = swApp.GetOpenDocument(sFileName)

swModel.ShowConfiguration2(sConfigName)

Outcomes