public static IDictionary <string, object> getOpenProjectProperties(OpenProjectParams openProjectParams) { IDictionary <string, object> properties = new Dictionary <string, object>(); properties[FILE_PATH] = openProjectParams.FilePath; return(properties); }
public bool OpenProjectReadWrite(string path, out object projectO, bool silent = false) { OpenProjectParams parameters = new OpenProjectParams(path); parameters.Access = TiaProjectAccess.ReadWrite; parameters.Silent = silent; ITiaProject project; bool returnB; try { returnB = m_PrimaryProjectManager.OpenProject(parameters, out project); if (project != null) { projectO = new TiaProjectProxy(project); } else { projectO = null; } return(returnB); } catch (Exception ex) { Console.WriteLine(ex); projectO = null; return(false); } }
/// <summary> /// Open a project. </summary> /// <param name="openProjectParams"> </param> /// <exception cref="GeneralSecurityException"> </exception> /// <exception cref="IOException"> </exception> /// <exception cref="URISyntaxException"> </exception> /// <exception cref="NeotysAPIException"> </exception> public void OpenProject(OpenProjectParams openProjectParams) { if (!Enabled) { return; } IDictionary <string, object> properties = DesignApiUtils.getOpenProjectProperties(openProjectParams); properties[DesignApiUtils.API_KEY] = apiKey; try { CreateEntity(DesignApiUtils.OPEN_PROJECT, properties); } catch (ODataException oDataException) { throw new NeotysAPIException(oDataException); } }
public bool OpenProjectReadOnly(string path, out object projectO, bool silent = false) { OpenProjectParams parameters = new OpenProjectParams(path); parameters.Access = TiaProjectAccess.ReadOnly; parameters.Silent = silent; ITiaProject project; bool returnB = m_PrimaryProjectManager.OpenProject(parameters, out project); if (project != null) { projectO = new TiaProjectProxy(project); } else { projectO = null; } return(returnB); }
public bool OpenProjectReadWrite(string path, out object projectO, bool silent = false) { OpenProjectParams parameters = new OpenProjectParams(path); parameters.Access = TiaProjectAccess.ReadWrite; parameters.Silent = silent; //parameters.OpenCallback = new UpgradeCurrentOpenCallback(new OpenProjectCommandData.CachingOpenFeedbackHandler()); ITiaProject project; bool returnB = TiaProjectManager.OpenProject(parameters, out project); if (project != null) { projectO = new TiaProjectProxy(project); } else { projectO = null; } return(returnB); }