Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 5
scottheide
271 Views, 4 Replies

RemoveDuplicates

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
4 REPLIES 4
Message 2 of 5
JackGregory
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

 

Message 3 of 5
scottheide
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
Message 4 of 5
ScottHeide
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 

Message 5 of 5
JackGregory
in reply to: ScottHeide

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.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report