We use iproperties to describe our parts and have a 40 character limit. Is there any way ilogic could be used to check and possibly warn if an iprop field exceeds 40 characters?
Thanks
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Which iProperty field are you using? Do you ever change the field that you fill out or is it consistent across all parts?
We populate many iprop fields but it is the "TITLE" and the "DESCRIPTION" fields that sometimes breach the 40 character limit. Each part has a different title/description.
The "TITLE" field is populated with the same characters as the "DESCRIPTION" field. We currently use a line in the rule to
control this;
iProperties.Value("summary", "Title") = iProperties.Value("Project", "Description")
Hi -ianf-,
Here is one method:
TitleInput:
Dim MyTitle As String
MyTitle = InputBox("Enter Title" & vblf & "( 40 character limit )", "iLogic", _
iProperties.Value("Summary", "Title"))
iProperties.Value("Summary", "Title") = MyTitle
currentLength = Len(MyTitle)
If currentLength > 40 Then
MessageBox.Show("Please limit the input to 40 characters or less." & vblf & _
"Current Input Length = " & currentLength, "iLogic ")
Goto TitleInput
Else
End If
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Thanks for that,
great liitle code which will definatley have a use. I am trying to build on some of the commands you have used but I am struggling.
Our iprop descriptions/titles are already populated from the parameters using a small code. Basically as the size of the part changes so do the descriptions. We don't require a description input box.
What I would like to happen is that an ilogic code checks the already inputted description for the character length and bring up a warning if the 40 limit is breached.
For example we have several sheet metal parts that can have many folds. Each fold size ends up in the part descriptions so there is the potential (on complicated pressed parts) to exceed 40 characters.
Thanks
Hi -ianf-,
Something like this will simply check the iProperty and then alert the user that it exceeds the limit.
I would set this to trigger on the Open and Save events, in order to catch the 40+ striings when a file is acessed or updated.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Dim MyTitle As String
MyTitle = iProperties.Value("Summary", "Title")
currentLength = Len(MyTitle)
If currentLength > 40 Then
MessageBox.Show("The Title iProperty currently exceeds the 40 character limit." & vblf & _
MyTitle & " = " & currentLength & " characters" , "iLogic ")
Else
End If
Can't find what you're looking for? Ask the community or share your knowledge.