Inventor General

Reply
Active Contributor
Posts: 28
Registered: ‎01-07-2010
Message 1 of 6 (242 Views)
Accepted Solution

Ilogic max character check

242 Views, 5 Replies
12-04-2012 02:45 AM

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

Ian Farmery
Inventor 2010 Pro SP4, Vault Collaboration 2010
HP Z820 Xeon E5-2643 0 @ 3.3Ghz 16.0GB RAM
Nvidia Quadro 5000
Mentor
MegaJerk
Posts: 249
Registered: ‎01-26-2011
Message 2 of 6 (218 Views)

Re: Ilogic max character check

12-04-2012 08:28 AM in reply to: -ianf-

Which iProperty field are you using? Do you ever change the field that you fill out or is it consistent across all parts? 

--------------------------------------------------------------------------------------

If my solution seems to remedy your problem, please press the Accept Solution button, -
as it increases my power levels and will eventually help to elevate me towards outer space.

Check out my iLogic injection tool here : http://goo.gl/ce1Qg
--------------------------------------------------------------------------------------
Active Contributor
Posts: 28
Registered: ‎01-07-2010
Message 3 of 6 (215 Views)

Re: Ilogic max character check

12-04-2012 08:51 AM in reply to: MegaJerk

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")

 

Ian Farmery
Inventor 2010 Pro SP4, Vault Collaboration 2010
HP Z820 Xeon E5-2643 0 @ 3.3Ghz 16.0GB RAM
Nvidia Quadro 5000
*Expert Elite*
Curtis_Waguespack
Posts: 2,565
Registered: ‎03-08-2006
Message 4 of 6 (208 Views)

Re: Ilogic max character check

12-04-2012 09:22 AM in reply to: -ianf-

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



  solution.png  Did you find this reply helpful ? If so please use the Accept as Solution or  Kudos button below.





Active Contributor
Posts: 28
Registered: ‎01-07-2010
Message 5 of 6 (159 Views)

Re: Ilogic max character check

01-18-2013 12:27 AM in reply to: Curtis_Waguespack

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

Ian Farmery
Inventor 2010 Pro SP4, Vault Collaboration 2010
HP Z820 Xeon E5-2643 0 @ 3.3Ghz 16.0GB RAM
Nvidia Quadro 5000
*Expert Elite*
Curtis_Waguespack
Posts: 2,565
Registered: ‎03-08-2006
Message 6 of 6 (149 Views)

Re: Ilogic max character check

01-18-2013 07:30 AM in reply to: -ianf-

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

 



  solution.png  Did you find this reply helpful ? If so please use the Accept as Solution or  Kudos button below.





You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube