Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

sorting of the tree structure

18 REPLIES 18
Reply
Message 1 of 19
Anonymous
1008 Views, 18 Replies

sorting of the tree structure

Hi,

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

Thx

Dom
18 REPLIES 18
Message 2 of 19
Anonymous
in reply to: Anonymous

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
Message 3 of 19
Anonymous
in reply to: Anonymous

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
Message 4 of 19
Anonymous
in reply to: Anonymous

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.
Message 5 of 19
Anonymous
in reply to: Anonymous

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.
Message 6 of 19
Anonymous
in reply to: Anonymous

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.
Message 7 of 19
Anonymous
in reply to: Anonymous

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.
Message 8 of 19
Anonymous
in reply to: Anonymous

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.
Message 9 of 19
Anonymous
in reply to: Anonymous

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.
Message 10 of 19
Anonymous
in reply to: Anonymous

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.
Message 11 of 19
Anonymous
in reply to: Anonymous

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.
Message 12 of 19
Anonymous
in reply to: Anonymous

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.
Message 13 of 19
JohanLarsson
in reply to: Anonymous

Why doesnt it run in IV 10?
-------------------------------------------------------------------------
Inventor Professional 2012 SP1 (25 seats with subscription)
Windows 7 64 bit
Lenovo D20, 12 GB RAM, Intel Xeon X5687 3.6 GHz, SSD
Quadro 4000, driver 8.17.12.9573, dual monitors
SpacePilot, driver version 6.15.3 Firmware 3.12
Message 14 of 19
Anonymous
in reply to: Anonymous

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?
Message 15 of 19
JohanLarsson
in reply to: Anonymous

You mean reorder through the API?
-------------------------------------------------------------------------
Inventor Professional 2012 SP1 (25 seats with subscription)
Windows 7 64 bit
Lenovo D20, 12 GB RAM, Intel Xeon X5687 3.6 GHz, SSD
Quadro 4000, driver 8.17.12.9573, dual monitors
SpacePilot, driver version 6.15.3 Firmware 3.12
Message 16 of 19
Anonymous
in reply to: Anonymous

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.
Message 17 of 19
JohanLarsson
in reply to: Anonymous

Can you share your code for the IV10 macro?
-------------------------------------------------------------------------
Inventor Professional 2012 SP1 (25 seats with subscription)
Windows 7 64 bit
Lenovo D20, 12 GB RAM, Intel Xeon X5687 3.6 GHz, SSD
Quadro 4000, driver 8.17.12.9573, dual monitors
SpacePilot, driver version 6.15.3 Firmware 3.12
Message 18 of 19
rschader
in reply to: Anonymous

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
Message 19 of 19
Anonymous
in reply to: Anonymous

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.

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

Post to forums  

Autodesk Design & Make Report