/// <summary> /// Открытие Inventor 2016 /// </summary> /// <param name="sender">Отправитель события</param> /// <param name="e">Параметры</param> private void RunInventorButton_Click(object sender, EventArgs e) { _inventorApi = new InventorApi(); }
/// <summary> /// Построение модели /// </summary> /// <param name="sender">Отправитель события</param> /// <param name="e">Параметры</param> private void CreateModelButton_Click(object sender, EventArgs e) { _inventorApi = new InventorApi(); _gasketModelCreator = new GasketModelCreator(_gasketProperties, _inventorApi); _gasketModelCreator.Build(_gasketProperties); if (changeFigureFormComboBox.SelectedIndex == 0) { _gasketModelCreator.CircleCutoutsBuilder(_gasketProperties); } if (changeFigureFormComboBox.SelectedIndex == 1) { _gasketModelCreator.RectangleCutoutsBuilder(_gasketProperties); } if (changeFigureFormComboBox.SelectedIndex == 2) { _gasketModelCreator.TriangleCutoutsBuilder(_gasketProperties); } }
/// <summary> /// Конструктор с входными параметрами модели /// </summary> /// <param name="gasketProperties">Параметры модели</param> /// <param name="inventorApi">API</param> public GasketModelCreator(GasketProperties gasketProperties, InventorApi inventorApi) { _gasketProperties = gasketProperties; _api = inventorApi; InventorApplication = inventorApi.InventorApplication; }