AddIn for Autodesk Inventor.
- Compiles to a DLL loaded by Autodesk Inventor as an AddIn.
- Adds a ribbon tab named "Astrus" with a panel named "Grawerowanie" (Engraving) and a button "Uruchom Grawerowanie" (Run Engraving).
- When the button is clicked, a form is displayed, which allows:
- Part Listing: Displays a list of parts from the active assembly, including their names, generated thumbnails, and current engraving text (from the "Grawer" iProperty).
- Thumbnail Generation: Generates visual thumbnails (screenshots) for all
.iptparts within the assembly and displays them in the UI. This process opens each part, captures a view, and then closes it. - Engraving: Processes all parts in the assembly that have a defined "Grawer" iProperty. It creates an extrusion feature (cut operation) named "Grawerowanie64" on a work plane, applying the text from the "Grawer" iProperty. Users can select the font and font size directly from the form, which are then applied to the engraving.
- IGES Export: Exports engraved parts to the IGES format into a subfolder named
IGESwithin the assembly's directory. (Note: The IGES export logic is present but may require further implementation for full functionality). - Part Closing Option: An optional setting to close part documents after they have been engraved.
- Logging: Provides a log area within the form to display messages and errors during operations.
- The AddIn works with Autodesk Inventor and requires .NET Framework 4.8.
- The button uses icons:
icon16(16x16 px) andicon32(32x32 px) from the project resources. It is recommended to add your own icons to the project resources for best appearance.
- Build the project in Visual Studio (requires .NET Framework 4.8 and Autodesk Inventor references).
- Create an
.addinmanifest file (see example below) and place it, along with the compiledmca64Inventor.dllfile, in Inventor's AddIns folder. Example location:C:\Users\<YourUserName>\AppData\Roaming\Autodesk\Inventor <Version>\Addins\
Create mca64Inventor.addin with the following content:
<AddIn>
<ClassId>{a5f3c3e7-7c33-46a2-b16a-42a4a4c25a17}</ClassId>
<ClientId>{a5f3c3e7-7c33-46a2-b16a-42a4a4c25a17}</ClientId>
<DisplayName>mca64Inventor AddIn</DisplayName>
<Description>Minimalistic AddIn template for Inventor with engraving and thumbnail generation features.</Description>
<Assembly>mca64Inventor.dll</Assembly>
<LoadOnStartUp>1</LoadOnStartUp>
</AddIn>- Extend your logic in the
mca64Inventornamespace. - Add your own buttons, panels, and event handling as needed.
- To change the button icon, add your own
icon16andicon32PNG files to the project resources (Properties/Resources.resx or Resource1.resx).
AddIn dla Autodesk Inventor.
- Kompiluje się do pliku DLL ładowanego przez Autodesk Inventor jako AddIn.
- Dodaje zakładkę na wstążce o nazwie "Astrus" z panelem "Grawerowanie" i przyciskiem "Uruchom Grawerowanie".
- Po kliknięciu przycisku, wyświetlany jest formularz, który umożliwia:
- Listowanie Części: Wyświetla listę części z aktywnego złożenia, w tym ich nazwy, wygenerowane miniaturki i aktualny tekst grawerowania (z właściwości iProperty "Grawer").
- Generowanie Miniaturek: Generuje wizualne miniaturki (zrzuty ekranu) dla wszystkich części
.iptw złożeniu i wyświetla je w interfejsie użytkownika. Proces ten otwiera każdą część, przechwytuje widok, a następnie ją zamyka. - Grawerowanie: Przetwarza wszystkie części w złożeniu, które mają zdefiniowaną właściwość iProperty "Grawer". Tworzy operację wyciągnięcia (cięcie) o nazwie "Grawerowanie64" na płaszczyźnie roboczej, stosując tekst z właściwości "Grawer". Użytkownicy mogą wybrać czcionkę i jej rozmiar bezpośrednio z formularza, które są następnie stosowane do grawerowania.
- Eksport do IGES: Eksportuje grawerowane części do formatu IGES do podfolderu o nazwie
IGESw katalogu złożenia. (Uwaga: Logika eksportu IGES jest obecna, ale może wymagać dalszej implementacji dla pełnej funkcjonalności). - Opcja Zamykania Części: Opcjonalne ustawienie do zamykania dokumentów części po ich wygrawerowaniu.
- Logowanie: Zapewnia obszar logowania w formularzu do wyświetlania wiadomości i błędów podczas operacji.
- AddIn współpracuje z Autodesk Inventor i wymaga .NET Framework 4.8.
- Przycisk wykorzystuje ikony:
icon16(16x16 px) iicon32(32x32 px) z zasobów projektu. Zaleca się dodanie własnych ikon do zasobów projektu dla lepszego wyglądu.
- Zbuduj projekt w Visual Studio (wymaga .NET Framework 4.8 i referencji do Autodesk Inventor).
- Utwórz plik manifestu
.addin(patrz przykład poniżej) i umieść go, wraz ze skompilowanym plikiemmca64Inventor.dll, w folderze AddIns Inventora. Przykład lokalizacji:C:\Users\<TwojaNazwaUżytkownika>\AppData\Roaming\Autodesk\Inventor <Wersja>\Addins\
Utwórz plik mca64Inventor.addin o następującej zawartości:
<AddIn>
<ClassId>{a5f3c3e7-7c33-46a2-b16a-42a4a4c25a17}</ClassId>
<ClientId>{a5f3c3e7-7c33-46a2-b16a-42a4a4c25a17}</ClientId>
<DisplayName>mca64Inventor AddIn</DisplayName>
<Description>Minimalistyczny szablon AddIn dla Inventora z funkcjami grawerowania i generowania miniaturek.</Description>
<Assembly>mca64Inventor.dll</Assembly>
<LoadOnStartUp>1</LoadOnStartUp>
</AddIn>- Rozszerzaj logikę w przestrzeni nazw
mca64Inventor. - Dodawaj własne przyciski, panele i obsługę zdarzeń według potrzeb.
- Aby zmienić ikonę przycisku, dodaj własne pliki PNG
icon16iicon32do zasobów projektu (Properties/Resources.resx lub Resource1.resx).
Template based on original code.
