Inventor General Discussion

Inventor General Discussion

Reply
Member
djgrooster
Posts: 3
Registered: ‎09-23-2011
Message 1 of 2 (283 Views)
Accepted Solution

iLogic Reading beginning of Filename

283 Views, 1 Replies
06-06-2013 09:57 AM

I'm attempting to create a rule using iLogic, which reads the first two letters of either the File Name or Part number (Which ever is easier)

i.e. if a part number was AB12345, I would want the code to recognize the "AB"

At which point I'm trying to use an If-Then-Else statement to modifiy the material of the part, dependent on the first two characters of the File name.

Is this possible?

 

As an example, where the underlined portion is what i don't know how to code:
If  iProperties.Value("Project", "Part Number") Begins with "AB" Then
    iProperties.Material = "Steel"
Else If iProperties.Value("Project", "Part Number") Begins with "AC" Then
    iProperties.Material = "Aluminum"
End If

 

Thanks
-Dan

I Figured this one out i went with
If Left(iProperties.Value("Project", "Part Number"),2)= "AB" Then
    iProperties.Material = "Steel"
Else If Left(iProperties.Value("Project", "Part Number"),2)= "AC" Then
    iProperties.Material= "Aluminum"
End If

Member
djgrooster
Posts: 3
Registered: ‎09-23-2011
Message 2 of 2 (267 Views)

Re: iLogic Reading beginning of Filename

06-06-2013 11:44 AM in reply to: djgrooster

I Figured this one out i went with
If Left(iProperties.Value("Project", "Part Number"),2)= "AB" Then
    iProperties.Material = "Steel"
Else If Left(iProperties.Value("Project", "Part Number"),2)= "AC" Then
    iProperties.Material= "Aluminum"
End If

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.