Tag: 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…
-
Inventorのカスタムアドインの Automation 公開機能
今週は、Inventor製品のカスタムアドインの Automation 機能を使ってカスタムメソッドを公開する事で、他の実行環境より利用できる手法をご紹介させていただきます。 これは、カスタマイズアドイン相互間でそれぞれのカスタマイズ関数やファンクションの相互利用を構築できるメリットがあり、カスタマイズシステム内でアドインの為の共通関数やファンクションをモジュール化したライブラリもアドインで構築できるなど、コーディングの効率化を始め、デバック作業の簡素化にも役立つメカニズムと考えます。 まず、Inventor製品向けのAPIによるカスタマイズは、Inventor API 入門 でもお知らせしておりますように、Autodesk Inventor オブジェクトモデルを使った、VBAIDEによるVBAマクロ や Visual Studio環境を使った Inventorアドイン や 外部EXE実行環境内からの操作 の他に、無料の読み込み専用の アペレンテスサーバー による カスタマイズシステムの構築が可能です。 この中でも、外部EXE実行環境内からの操作として、Inventor API 入門 その4 外部実行プログラムより Inventor製品 を制御する方法 で 「Autodesk Inventor Object Library」として一般に公開されている Inventor2015ObjectModel をハンドリングしたカスタマイズシステムを作成いただけます。 カスタマイズに際して、以下の 日本語版の API プログラミングヘルプ がご利用いただけます。 日本語版 Inventor 2015 API プログラミング用ヘルプ QA-9268 日本語版 Inventor 2015 API Help 実際にカスタマイズシステムの設計や作成をしていくのに、カスタマイズアドイン内から他のカスタマイズアドイン内のメソッドやファンクションを直接利用したり、外部の実行EXEから起動されているInventor内のカスタムアドイン内のメソッドやファンクションを直接利用したい要望は必ず発生しているはずです。 マクロなどは、Inventor.VBAProjects.InventorVBAComponentsコレクション内のInventorVBAComponentオブジェクトの中から、InventorVBAMemberによりモジュール内のマクロにアクセスし、Executeメソッドにて他のマクロを実行する方法は存在します。 一方、カスタムアドインの場合、カスタムアドイン側で Automation メソッドを使い独自のインターフェースとして公開する事で、カスタマイズアドイン相互間でのそれぞれの関数やファンクションの相互利用を始め、外部実行EXE環境からもInventor製品が起動している状態であれば、カスタムアドイン内で公開されたインターフェースを通して関数やファンクションがご利用いただけます。 以下の QA-9517…

You must be logged in to post a comment.