Tag: Design Automation
-
Lesson 3: Create a shoebox
Python C++ Typescript @dataclass class BoxParameters: border_thickness : float bottom_thickness : float inner_width : float inner_length : float inner_height : float fillet_size : float def __init__(self, border_thickness: float, bottom_thickness:float, inner_width:float, inner_length:float, inner_height:float, fillet_size:float): self.border_thickness = border_thickness self.bottom_thickness = bottom_thickness self.inner_width = inner_width self.inner_length = inner_length self.inner_height = inner_height self.fillet_size = fillet_size typedef struct { double…
-
Lesson 2: Understand the document
#include <Fusion/Components/Component.h> // Get the value of the property. Ptr<Features> propertyValue = component_var->features(); std::string processProperty(const Ptr<Property>& property) { const char* propertyObjectType = property->objectType(); if (strcmp(IntegerProperty::classType(), propertyObjectType) == 0) return processIntegerProperty(property); if (strcmp(StringProperty::classType(), propertyObjectType) == 0) return processStringProperty(property); if (strcmp(BooleanProperty::classType(), propertyObjectType) == 0) return processBooleanProperty(property); if (strcmp(FloatProperty::classType(), propertyObjectType) == 0) return processFloatProperty(property); if (strcmp(ChoiceProperty::classType(), propertyObjectType) ==…
-
Lesson 1: The basic scripts and Add-in
Python/C++ Typescript 1. Launch Fusion, find utilities and click at the drop menu of ADD-INS button. You can find Scripts and Add-ins menu item. 2. Click at it, in the new window, we can create two types of add-ins: Scripts and Add-ins. There isn’t much different between them technically. The script will run at once…
-
Design Automation API for Inventor – Visual Studio template のご紹介
今回の記事では、Design Automation API for Inventorで使用するInventor Plug-inを開発する際に便利なVisual Studio template をご紹介いたします。 このテンプレートを使用することにより、Inventor Plug-inの作成に必須の処理を含んだスケルトンコードを生成することができます。 また、このVisual Studioテンプレートを使用することのもう一つの利点は、ローカルでのデバッグ作業を行うヘルパープロジェクトを生成してくれることにあります。 ご存知のように、Design Automation for Inventorを利用するにあたっては、自動化する処理を記述したInventor Plug-inを作成し、バイナリファイルとPackageContents.xmlをZip圧縮をして、AppBundleとしてアップロードをする必要があります。一方で、作成したPlug-inの動作を確認するために、クラウド上のInventorコアエンジンを用いて毎回AppBundleにアップロードするというのは少々手間がかかりすぎます。 このため、Design Automation for Inventorで動作を確認する前に、このVisual Studioテンプレートから生成されるヘルパープロジェクトを用いて、ローカルコンピュータで事前の動作確認をすることをお勧めいたします。 インストール方法 インストールは、Visual Studio 2017のエディタ内から行います。[ツール]-[機能拡張と更新プログラム]を選択します。 表示されたダイアログの左のリストから、オンラインを選択し、右側のパネルの検索文字列に”Forge”を入力して検索をすると、Design Automation for Invenorがリストに表示されるので、ダウンロードボタンを押してダウンロードをします。 ダウンロード完了後、Visual Studioを終了すると以下のようなメッセージが表示されるので、「Modify」をクリックするとインストールが開始されます。 新規プロジェクトの作成とデバッグ実行 インストールをしたテンプレートを使用してプロジェクトを作成するには、Visual Studioの新規プロジェクト作成時にVisual C#配下の「Design Automation for Inventor」を選択して新規にプロジェクトを作成します。 Plug-in用のプロジェクトを含むソリューションが作成されます。 ソリューションをビルドすると、ソリューション作成フォルダ\Outputフォルダ配下に、Plug-inのバイナリファイルを含むZipファイルが作成されます。 また、DebugPluginLocallyプロジェクトをスタートアッププロジェクトに設定し、デバッグを開始するとInventorが起動してPlug-inの処理(RunWithArgumentsメソッド)が実行されます。 なお、Plug-inに引き渡す引数を追加・変更する場合は、DebugPluginLocallyプロジェクトのProgram.csファイルの以下の部分を編集します。 また、Interactionプロジェクトを使用することで、作成したPlug-inをAppBundleとしてForge環境へアップロードすることができます。…
-
Forge Online – Design Automation:Inventor タスクの自動化
Forge Online、今回は、Inventor タスクの自動化と題して、Design Automation API for Inventor(DA4I)についてご案内したいと思います。 動画で利用しているプレゼンテーション資料(PDF)は次のリンクからダウンロードいただけます。スライド下部にある URL で、スライドで説明した内容のブログ記事、また、参考 Web ページを参照することが出来ます。 Design Automation API for Inventor の理解 InventorアドインのForge Design Automationへの適用 Forge Online、次回は 課金と Forge 開発ビジネスについてご案内の予定です。 By Takehiro Kato

You must be logged in to post a comment.