Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSiApplication" /> class by attaching to an existing process.
 /// </summary>
 /// <param name="numberOfAttachmentAttempts">The number of attempts before the library stops attempting to attach to the application.</param>
 /// <param name="intervalBetweenAttachmentAttempts">The interval between attempts of attaching to the application.</param>
 /// <param name="numberOfExitAttempts">The number of exit attempts before the library stops attempting to exit the application.</param>
 /// <param name="intervalBetweenExitAttempts">The interval between exit attempts of the application.</param>
 protected CSiApplication(int numberOfAttachmentAttempts,
                          int intervalBetweenAttachmentAttempts,
                          int numberOfExitAttempts        = 1,
                          int intervalBetweenExitAttempts = 0)
 {
     _apiApp = new ApiCSiApplication(numberOfAttachmentAttempts,
                                     intervalBetweenAttachmentAttempts,
                                     numberOfExitAttempts,
                                     intervalBetweenExitAttempts);
     NumberOfAttachmentAttempts = numberOfAttachmentAttempts;
     IntervalBetweenAttachmentAttachmentAttempts = intervalBetweenAttachmentAttempts;
     NumberOfExitAttempts        = numberOfExitAttempts;
     IntervalBetweenExitAttempts = intervalBetweenExitAttempts;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSiApplication" /> class using the default installed application.
 /// When the model is not visible it does not appear on screen and it does not appear in the Windows task bar.
 /// If no filename is specified, you can later open a model or create a model through the API.
 /// The file name must have an .sdb, .$2k, .s2k, .xls, or .mdb extension.
 /// Files with .sdb extensions are opened as standard SAP2000 files.
 /// Files with .$2k and .s2k extensions are imported as text files.
 /// Files with .xls extensions are imported as Microsoft Excel files.
 /// Files with .mdb extensions are imported as Microsoft Access files.
 /// </summary>
 /// <param name="units">The database units used when a new model is created.
 /// Data is internally stored in the program in the database units.</param>
 /// <param name="visible">True: The application is visible when started.
 /// False: The application is hidden when started.</param>
 /// <param name="modelPath">The full path of a model file to be opened when the application is started.
 /// If no file name is specified, the application starts without loading an existing model.</param>
 /// <param name="numberOfExitAttempts">The number of exit attempts before the library stops attempting to exit the application.</param>
 /// <param name="intervalBetweenExitAttempts">The interval between exit attempts of the application.</param>
 protected CSiApplication(eUnits units                    = eUnits.kip_in_F,
                          bool visible                    = true,
                          string modelPath                = "",
                          int numberOfExitAttempts        = 1,
                          int intervalBetweenExitAttempts = 0)
 {
     _apiApp = new ApiCSiApplication(units,
                                     visible,
                                     modelPath,
                                     numberOfExitAttempts,
                                     intervalBetweenExitAttempts);
     NumberOfExitAttempts        = numberOfExitAttempts;
     IntervalBetweenExitAttempts = intervalBetweenExitAttempts;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSiModel" /> class.
 /// </summary>
 /// <param name="app">The application.</param>
 internal CSiModel(ApiCSiApplication app) : base(app)
 {
 }