sorting of the tree structure

sorting of the tree structure

Anonymous
Not applicable
1,488 Views
18 Replies
Message 1 of 19

sorting of the tree structure

Anonymous
Not applicable
Hi,

Is there a program which would alphabetically sort the components of an
assembly in the navigator?

Thx

Dom
0 Likes
1,489 Views
18 Replies
Replies (18)
Message 2 of 19

Anonymous
Not applicable
See the attached text file for a program that does the alpha-sorting. This
is also included as a command in the 'Assembly Tools' SDK sample delivered
with R11.

Sanjay-


"Dominique" < wrote in message
news:5184312@discussion.autodesk.com...
Hi,

Is there a program which would alphabetically sort the components of an
assembly in the navigator?

Thx

Dom
0 Likes
Message 3 of 19

Anonymous
Not applicable
Thanks, it work fine.

Regards

Dom

"Sanjay Ramaswamy (Autodesk)" a écrit dans
le message de news: 5184999@discussion.autodesk.com...
See the attached text file for a program that does the alpha-sorting. This
is also included as a command in the 'Assembly Tools' SDK sample delivered
with R11.

Sanjay-


"Dominique" < wrote in message
news:5184312@discussion.autodesk.com...
Hi,

Is there a program which would alphabetically sort the components of an
assembly in the navigator?

Thx

Dom
0 Likes
Message 4 of 19

Anonymous
Not applicable
So what is the trick to running this code. Every time I try
to run it in an assembly, all I get is a "Sorting Failed"
message!

Bob S.
0 Likes
Message 5 of 19

Anonymous
Not applicable
Which release are you on? There were a few problems in R10 that were fixed
in R11. Could you try it with different assemblies, perhaps simple ones to
begin with?

Sanjay-

"Bob S." wrote in message
news:5185755@discussion.autodesk.com...
So what is the trick to running this code. Every time I try
to run it in an assembly, all I get is a "Sorting Failed"
message!

Bob S.
0 Likes
Message 6 of 19

Anonymous
Not applicable
I'm running it in R11 SP0. Not a very complex assembly. I will try
it on some other simpler ones (20 components, approx) and let you
know. Most of these assemblies are probably migrated from R10 if
that matters.

Bob S.
0 Likes
Message 7 of 19

Anonymous
Not applicable
Sanjay,

I was able to get it to run on a couple very simple
assemblies at this point (up to 5 component occurrences)
but it chokes on one with approx 40 component occurrences.
At first I thought it might be due to subassemblies, but
one of the small ones I ran it on also had subassemblies in it.
Again, R11.

Bob S.
0 Likes
Message 8 of 19

Anonymous
Not applicable
It seems to work fine with the 'Engine.iam' sample delivered with Inventor
(this has over 40 occurrences). Would you be able to narrow down the problem
with the assembly you are using? By perhaps deleting some occurrences?

Sanjay-

"Bob S." wrote in message
news:5186311@discussion.autodesk.com...
Sanjay,

I was able to get it to run on a couple very simple
assemblies at this point (up to 5 component occurrences)
but it chokes on one with approx 40 component occurrences.
At first I thought it might be due to subassemblies, but
one of the small ones I ran it on also had subassemblies in it.
Again, R11.

Bob S.
0 Likes
Message 9 of 19

Anonymous
Not applicable
I don't really have the time to play with it right now.
Maybe I could send you an assembly that it chokes on?

Bob S.
0 Likes
Message 10 of 19

Anonymous
Not applicable
Sure. sanjayDOTramaswamyATautodeskDOTcom

Sanjay-

"Bob S." wrote in message
news:5186427@discussion.autodesk.com...
I don't really have the time to play with it right now.
Maybe I could send you an assembly that it chokes on?

Bob S.
0 Likes
Message 11 of 19

Anonymous
Not applicable
Sanjay,

I tried sending you a zipfile, but it got kicked back to me.
I sent another email stating that and I have not heard
from you. Please let me know if you got that email.

Bob S

Sanjay Ramaswamy (Autodesk) wrote:
> Sure. sanjayDOTramaswamyATautodeskDOTcom
>
> Sanjay-
>
> "Bob S." wrote in message
> news:5186427@discussion.autodesk.com...
> I don't really have the time to play with it right now.
> Maybe I could send you an assembly that it chokes on?
>
> Bob S.
0 Likes
Message 12 of 19

Anonymous
Not applicable
I've posted a small assembly example in customer-files that
fails to sort the browser nodes in case anyone thinks they
can figure out the problem.

Bob S.
0 Likes
Message 13 of 19

Anonymous
Not applicable
Why doesnt it run in IV 10?
0 Likes
Message 14 of 19

Anonymous
Not applicable
The ability to reorder the browser nodes wasn't supported until Inventor 11.
--
Brian Ekins
Autodesk Inventor API

wrote in message news:5271404@discussion.autodesk.com...
Why doesnt it run in IV 10?
0 Likes
Message 15 of 19

Anonymous
Not applicable
You mean reorder through the API?
0 Likes
Message 16 of 19

Anonymous
Not applicable
Wrong! I had a macro that reordered the browser nodes in 10. But
now it fails in 11. The implementation of it has changed, but it
WAS there in 10.

Bob

Brian Ekins (Autodesk) wrote:
> The ability to reorder the browser nodes wasn't supported until Inventor 11.
0 Likes
Message 17 of 19

Anonymous
Not applicable
Can you share your code for the IV10 macro?
0 Likes
Message 18 of 19

rschader
Advocate
Advocate
I guess I don't see why not since it doesn't seem to work in 11 anyway. It's also rather slow, but it did work at one time. The zip file contains both a ivb and an exported bas file in case the ivb file isn't compatible. The main sub is probably NOT named correctly for function, it is called QueryModelTree (probably because I copied a sample to start with. There is also extra sorting functions in this I borrowed that didn't get used, or I couldn't get them to work. Let me know if it does indeed still work on 10, if you could. Thanks,

Bob Schader
0 Likes
Message 19 of 19

Anonymous
Not applicable
Hi Bob,

You're right. I quickly forget when new features came in. The Reorder
method on the browser has been around for a while. The reason I was
thinking it showed up in 11 was because we showed a demonstration of
reordering the assembly browser as part of the demos of what's new in
Inventor 11. In this case it wasn't the reorder functionality that was new
but some changes in assembly that allowed it to work correctly there.
--
Brian Ekins
Autodesk Inventor API

"Bob S." wrote in message
news:5271519@discussion.autodesk.com...
Wrong! I had a macro that reordered the browser nodes in 10. But
now it fails in 11. The implementation of it has changed, but it
WAS there in 10.

Bob

Brian Ekins (Autodesk) wrote:
> The ability to reorder the browser nodes wasn't supported until Inventor
> 11.
0 Likes