//// TransCAD 관련 함수 public bool InitializeTransCAD() { try { tApp = (TransCAD.Application)Marshal.GetActiveObject("TransCAD.Application"); } catch { tApp = (TransCAD.Application)Activator.CreateInstance(Type.GetTypeFromProgID("TransCAD.Application")); } if (tApp == null) { return(false); } tDocs = tApp.Documents; tAssemDoc = tDocs.AddAssemDocument(); tAssem = tAssemDoc.Assem; tComp = tAssem.CreateComponent(); tComp.set_Name("Components1"); tAssem.AddComponent(tComp); tConstraints = tAssem.Constraints; tApp.Visible = true; return(true); }
public void UninitializeTransCAD() { tApp = null; tDocs = null; tAssemDoc = null; tAssem = null; tComp = null; tConstraints = null; }
public int NumOfConstraint(Assembly assemManager) { Constraints = assemManager.tAssem.Constraints; return(NumConstraints = Constraints.Count); }