PDA

View Full Version : Inquiring all sheet features in a big assembly


jkramer
06-24-2004, 08:06 AM
Hi,

I discovered something today.... there's an error in one of the bend processes of our Sheet Advisor toolshop. I made a test-copy of the shop, and checked what would would happen if I'd just "repair" the shop. The problem is that if I do so, an "update View" on a sheet part using that process would change the flat on the drawing, and we don't want that.

So I want to find out exactly which parts use that particular process (I know there aren't many of them).
Therefore, I'm trying to write a Lisp routine that scans a complete assembly and prints all sheet features of all models in it.

Problem: I use the function "SHA_INQUIRE_FEATURES", but the Lisp routine won't work as soon as there's a non-sheet part in the assy. Is there a way around this?? For instance, if I'd have a function that tells me if a part is a valid sheet part, I could simply use the UIRE_FEATURES function only on the sheet parts. Or if I could tell the routine to just ignore errors...

Any clues?

Thanks!
Jaap

John van Doorn
06-25-2004, 01:45 AM
Jaap,

Without having your code to test, i think it would be possible to use the function sd-call-cmds
This command has two options :failure and :succes so i guess if your command can't run because there aren't any sheet models it will throw the failer form.

If you post your lisp file it would be easy for me to test and modify it.



John

jkramer
06-25-2004, 02:27 AM
Hi John,

Cool, it works! Thanks!
Here's the Lisp code I made; maybe it's useful for others.
If a part is not a sheet parts, the macro will simply display "--".

Regards,
Jaap