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

    Autodesk Inventor Customization

    Reply
    *Pro
    jletcher
    Posts: 1,325
    Registered: ‎05-18-2011

    Re: ilogic to count features

    08-15-2012 08:39 AM in reply to: jletcher

    now I did rename the hole feature could this be the reason it's not working.


    Please mark this response as "Accept as Solution" if it answers your question.

    James Letcher
    2012 Factory Design Suite ( will not load 2013)
    What happen to my Inventor :-(
    Please use plain text.
    *Pro
    jletcher
    Posts: 1,325
    Registered: ‎05-18-2011

    Re: ilogic to count features

    08-15-2012 08:46 AM in reply to: jletcher

    Here is a screen shot to show error

     

    Error.JPG


    Please mark this response as "Accept as Solution" if it answers your question.

    James Letcher
    2012 Factory Design Suite ( will not load 2013)
    What happen to my Inventor :-(
    Please use plain text.
    *Pro
    jletcher
    Posts: 1,325
    Registered: ‎05-18-2011

    Re: ilogic to count features

    08-15-2012 08:47 AM in reply to: jletcher

    Holes I would like to have count if active and remove from count if inactive

     

    holes.JPG


    Please mark this response as "Accept as Solution" if it answers your question.

    James Letcher
    2012 Factory Design Suite ( will not load 2013)
    What happen to my Inventor :-(
    Please use plain text.
    Valued Contributor
    thomaskennedy
    Posts: 93
    Registered: ‎09-27-2010

    Re: ilogic to count features

    08-15-2012 08:48 AM in reply to: jletcher

    Hmmm..

     

    Which line is Line 64 in your rule?

    Please use plain text.
    *Pro
    jletcher
    Posts: 1,325
    Registered: ‎05-18-2011

    Re: ilogic to count features

    08-15-2012 08:56 AM in reply to: thomaskennedy

    its the for each statement that you supplied..


    Please mark this response as "Accept as Solution" if it answers your question.

    James Letcher
    2012 Factory Design Suite ( will not load 2013)
    What happen to my Inventor :-(
    Please use plain text.
    Valued Contributor
    thomaskennedy
    Posts: 93
    Registered: ‎09-27-2010

    Re: ilogic to count features

    08-15-2012 09:00 AM in reply to: jletcher

    Could you post your entire rule ? I can't see why it wouldn't work.

     

    Or even better you could post your model...

    Please use plain text.
    *Pro
    jletcher
    Posts: 1,325
    Registered: ‎05-18-2011

    Re: ilogic to count features

    08-15-2012 09:26 AM in reply to: thomaskennedy

    Here is the model


    Please mark this response as "Accept as Solution" if it answers your question.

    James Letcher
    2012 Factory Design Suite ( will not load 2013)
    What happen to my Inventor :-(
    Please use plain text.
    Valued Contributor
    thomaskennedy
    Posts: 93
    Registered: ‎09-27-2010

    Re: ilogic to count features

    08-15-2012 10:07 AM in reply to: jletcher

    Im not sure why it didnt work first time, I re copied the code back in and now its working.

     

    I also added a line that checks if the last char of the hole name is a number - if it is a number then it doesnt get added to the count.

     

    Hope this works OK for you.

    Please use plain text.
    *Pro
    jletcher
    Posts: 1,325
    Registered: ‎05-18-2011

    Re: ilogic to count features

    08-15-2012 10:11 AM in reply to: thomaskennedy

    Thats it great thanks...


    Please mark this response as "Accept as Solution" if it answers your question.

    James Letcher
    2012 Factory Design Suite ( will not load 2013)
    What happen to my Inventor :-(
    Please use plain text.
    Distinguished Contributor
    Posts: 220
    Registered: ‎12-17-2007

    Re: ilogic to count features

    08-16-2012 05:30 AM in reply to: jletcher

    Just guessing but you where probably just missing the "End If" statement right above the Line that says "Next HFeature".  If you where wondering why it wasn't working the first time. 

     

    PS - Thanks for the link to this on my post. 

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

    If this response answers your question please click "Accept as Solution".
    Please use plain text.