Why won't this simple iLogic code work for Content Center part??

Why won't this simple iLogic code work for Content Center part??

EScales
Advocate Advocate
431 Views
2 Replies
Message 1 of 3

Why won't this simple iLogic code work for Content Center part??

EScales
Advocate
Advocate

I'm trying to test out some simple iLogic code that will ultimately let me determine if an .ipt file is a Content Center part.  So, I tried this:

 

If iProperties.Value("Summary", "Category") = FASTENERS Then
MessageBox.Show("This is a FASTENER", "M,P,S")
Else
MessageBox.Show("I don't know what to do", "M,P,S")
End If

 

 

I have edited my Content Center libraries to include "FASTENERS" in the iProperties, Summary, Category field.

And I've checked the part file and it DOES show FASTENERS in the Category field.

Fastners.PNG

But, when I have the part file open and run the rule, I get the second message "I don't know what to do".

I would expect the first message "This is a FASTENER" to appear, but it doesn't.

What's going on here?? 

0 Likes
Accepted solutions (1)
432 Views
2 Replies
Replies (2)
Message 2 of 3

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@EScales,

 

While comparing "Category" value, FASTENERS should be inside double quotes ("") as below. This seems to be comparison issue. 

 

If iProperties.Value("Summary", "Category") = "FASTENERS" Then
MessageBox.Show("This is a FASTENER", "M,P,S") 
Else
MessageBox.Show("I don't know what to do", "M,P,S")
End If

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 3

EScales
Advocate
Advocate

Oh geeze...now I feel dumb...er.  I can't believe I missed something so simple.  I think I stared at it so long that I was second guessing myself.  Oh well.

Thanks for the help!

0 Likes