VBA iproperty formulas

VBA iproperty formulas

Anonymous
Not applicable
642 Views
2 Replies
Message 1 of 3

VBA iproperty formulas

Anonymous
Not applicable
Firstly I'm not sure if this post should be listed in the customization group, but I remember Brian Ekins mentioning
something about these concatenations at AU2007

Is it possible to concatenate Inventor's iproperties using the API? What is the syntax for such concatenation?
ie Can you define a new Custom iproperty derived from a string and existing common/existing custom iproperties such as "description", "part number" "width" "length" is the same manner as you would do using the customising functions in the content center editor expression columns?

I have not seen any detailed documents describing how to concatenate iproperties generally..could someone please point me at some information regarding this too 🙂 thanks
in advance
Allan
0 Likes
643 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Here's some example code that sets the formula for the Comment property to
be a combination of the Title and Subject properties. Notice that is uses
the Expression property of the Property object.

Public Sub SetPropExpression()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument

Dim oSummaryInfo As PropertySet
Set oSummaryInfo = oDoc.PropertySets("Inventor Summary Information")

Dim oCommentsProp As Property
Set oCommentsProp = oSummaryInfo.Item("Comments")
oCommentsProp.Expression = "= and <SUBJECT>"<BR /> End Sub<BR /> -- <BR /> Brian Ekins<BR /> Autodesk Inventor API</SUBJECT>
0 Likes
Message 3 of 3

Anonymous
Not applicable
Brian,
Thank you that is the code example I was looking for.

I have looked through the Inventor discussion groups to see if I can find a more detailed explanation of the concatenation of iproperties generally.Previously MDT allowed quite a range of manipulation of formula (BOM table)that Inventor doesn't seem to offer.
Would you have any information that describes the syntax for the formulas from a non-programming persective? The help is seems thin on the subject.
Allan
0 Likes