iProperties Add Property to Project tab - API VB.NET

iProperties Add Property to Project tab - API VB.NET

florian_wenzel
Advocate Advocate
616 Views
3 Replies
Message 1 of 4

iProperties Add Property to Project tab - API VB.NET

florian_wenzel
Advocate
Advocate

Hi,

 

Inventor 2022

API VB.NET Visual Studio

 

i try to add a Property to iProperties exyctly to Project Tab ("Design Tracking Properties").

But without success.

Is this possible, add to Project ?

 

The Goal is to get something like this.

florian_wenzel_0-1662672941071.png

 

 

This is my Code:

Imports System.Runtime.InteropServices
Imports Inventor
Imports Microsoft.Win32
Imports System.Collections.Generic
Imports System.Linq
Imports System.IO

Module CommandFunctionButton_12

    Public Sub CommandFunctionfweButton_12()
        Dim oPartDoc As PartDocument = g_inventorApplication.ActiveDocument
        Dim oCompDef As PartComponentDefinition = oPartDoc.ComponentDefinition
        Dim oTO As TransientObjects = g_inventorApplication.TransientObjects
        Dim oTG As TransientGeometry = g_inventorApplication.TransientGeometry



        Dim oProperty As Inventor.Property
        Dim oPropertySet As Inventor.PropertySet

        oPropertySet = oPartDoc.PropertySets.Item("Design Tracking Properties")
        'oPropertySet = oPartDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}")

        oProperty = oPropertySet.Add("204", "MaterialCode")




    End Sub

End Module

 

Error:

Unknow Error

florian_wenzel_1-1662673089524.png

 

 

 

Thanks for any Sugestion.

 

0 Likes
Accepted solutions (2)
617 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor
Accepted solution
With this you add a propertyset no property.
You need to do
Propertyset.item(***).add(###)

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 3 of 4

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi @florian_wenzel 

 

We do not have access to create iProperties on the standard tabs.

 

You will need to add your new property to the Custom tab.

 

oPropertySet = oPartDoc.PropertySets.Item("Inventor User Defined Properties")

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 4 of 4

florian_wenzel
Advocate
Advocate

Hi Curtis_Waguespack

 

 

Thanks for Answer,

Good to Know, that we are not able to do this.

 

Because i need this in Bill of Materials, and when i will be able to add a Property to Project tab, then it will be a easy step to add this to Bill of Materials.

 

And are we able to Change the Name of the Property in Project tab?

what do displayName?

 

Ok i got it.

 

Add Custom iProperty Columns   - in Bill of Materials

0 Likes