Inventor General Discussion

Inventor General Discussion

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

iLogic Reading beginning of Filename

277 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 (261 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
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.