• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Inventor

    Reply
    Active Contributor
    Posts: 28
    Registered: ‎01-07-2010
    Accepted Solution

    Ilogic max character check

    171 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 2011 SP2, Vault Professional 2011
    Dell T3400 Core2 Quad 2.4GHz. 8.0GB RAM
    Nvidia Quadro FX1700 (x2)
    Please use plain text.
    Mentor
    MegaJerk
    Posts: 189
    Registered: ‎01-26-2011

    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
    --------------------------------------------------------------------------------------
    Please use plain text.
    Active Contributor
    Posts: 28
    Registered: ‎01-07-2010

    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 2011 SP2, Vault Professional 2011
    Dell T3400 Core2 Quad 2.4GHz. 8.0GB RAM
    Nvidia Quadro FX1700 (x2)
    Please use plain text.
    *Expert Elite*
    Curtis_Waguespack
    Posts: 1,955
    Registered: ‎03-08-2006

    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.

    Please use plain text.
    Active Contributor
    Posts: 28
    Registered: ‎01-07-2010

    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 2011 SP2, Vault Professional 2011
    Dell T3400 Core2 Quad 2.4GHz. 8.0GB RAM
    Nvidia Quadro FX1700 (x2)
    Please use plain text.
    *Expert Elite*
    Curtis_Waguespack
    Posts: 1,955
    Registered: ‎03-08-2006

    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.

    Please use plain text.