Status property to VBA

Status property to VBA

J.Classens
Enthusiast Enthusiast
367 Views
1 Reply
Message 1 of 2

Status property to VBA

J.Classens
Enthusiast
Enthusiast

Hello,

 

In a VBA solution i need to get the State property to  set it in a formule.

 

JClassens_0-1629097909386.png

 

The problem is that this property isn't present in the propertydesign sets.

https://knowledge.autodesk.com/search-result/caas/simplecontent/content/list-all-iproperties-and-how...

 

Is there a possibilty to acces this property?

I want to set it to a custom name like the code beneath here. 

 

Set oPartStatus = oCompDef.Document.PropertySets _
.Item("Design Tracking Properties").Item("Design Status")

 

 

 

 

0 Likes
Accepted solutions (1)
368 Views
1 Reply
Reply (1)
Message 2 of 2

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @J.Classens 

The property name is "User Status" and it's located in "Design Tracking Properties"

See example below to set the value of this property with VBA:

Sub SetStatus()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument
Dim oStatusProp As Inventor.Property
Set oStatusProp = oDoc.PropertySets("Design Tracking Properties")("User Status")
oStatusProp.Value = "My value" 'Set value of status
End Sub