• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Autodesk Inventor Engineer-to-Order

    Reply
    Active Contributor
    scottheide
    Posts: 26
    Registered: ‎01-17-2012

    RemoveDuplicates

    141 Views, 4 Replies
    12-21-2012 10:34 AM

    Maybe I'm missing something obvious, but I can't get the RemoveDuplicates example in the documentation to work when providing a test.

     

    Function sameType?(I AsAny, j AsAny) AsBoolean

        sameType? = (typeName(i) = typeName(j))

    End Function

     

    RemoveDuplicates({:a, :b, 3, "a", "b", {3}, "3"}, test := :sameType?)

     

    I put a _debug in the test function and it doesn't hit it; it doesn't even seem to be calling the test function.

     

    Any ideas what I'm doing wrong?

     

    Any help is appreciated!

     

    - Scott

     

     

     

    ScottHeide@CruzBayCustom.com
    Please use plain text.
    Employee
    Posts: 87
    Registered: ‎03-06-2006

    Re: RemoveDuplicates

    01-23-2013 10:10 AM in reply to: scottheide

    Scott:

    What release and build number is this in?

    I have done some tests, and can confirm there is something wrong here.  I am still investigating, but it looks like the test function argument is being ignored.  Not a surprise to you, but it sure is to me!

     

    --Jack Gregory

     

    Please use plain text.
    Active Contributor
    scottheide
    Posts: 26
    Registered: ‎01-17-2012

    Re: RemoveDuplicates

    01-23-2013 10:16 AM in reply to: JackGregory

    Release version 5.1

    Build: 322 Date: 11/9/2011

     

    [I have a work-around for now.  It is OK with me to just fix it in the latest release.]

     

    Thanks,


    Scott

    ScottHeide@CruzBayCustom.com
    Please use plain text.
    Active Member
    ScottHeideAuto
    Posts: 7
    Registered: ‎01-12-2012

    Re: RemoveDuplicates

    04-09-2013 06:24 AM in reply to: scottheide

    Jack, have you guys fixed this for the current release?   Any chance of backporting this to:

     

    Release version 5.1

    Build: 322 Date: 11/9/2011

     

    Or just giving us a patch file to try?  We wrote our own version of it in straight Intent code, but it has been identified as a source of speed and memory issues.

     

    Thanks,


    Scott 

    Please use plain text.
    Employee
    Posts: 87
    Registered: ‎03-06-2006

    Re: RemoveDuplicates

    04-09-2013 08:33 AM in reply to: ScottHeideAuto

    This is defect DE936, and has not been fixed yet, the issue is that the Test optional argument is not being used.  There are no plans to fix this in older releases.

     

    Because it is just the test function, it is probably possible to work around this with some kind of pre-filetering, but it is not clear that it would be more efficient.  The faster workaround might be to do this processing in .Net functions and call those from Intent language.

     

    Please use plain text.