Jim Clayton Posted November 9, 2020 Posted November 9, 2020 Hey everyone. I have a Lisp from Mr. Mac that he helped me with a while back that I use to Auto-Number BOM attributes. I'm including the Lisp and two example drawings attached. The issue that I'm having is that when i create BOM's from scratch, with new attributes, the Lisp works fine (Example 1). When I try to steal BOM parts from other drawings to build a BOM, the Lisp will number the lines out of order (Example 2). I'm trying to see if there is a way to modify it so that I can get around this. In theory i could just copy the data to a new fresh line. But the more lines you have, the more time consuming that becomes. If anyone might be able to help i would greatly appreciate it. Tks. AutoLabelBOM.lsp Example1.dwg Example2.dwg Quote
Lee Mac Posted November 9, 2020 Posted November 9, 2020 Hi Jim, My Auto Label Attributes application will sequentially number the attribute values in the order in which the block references are encountered in the drawing database; such order is typically the order in which the block references are created, however, when multiple objects are copied or imported into a drawing, you have no control over the order in which those objects are added to the drawing database. Quote
Jim Clayton Posted November 10, 2020 Author Posted November 10, 2020 Lee Mac...The Man, The Myth, The Legend. Nice to hear from you. While I can't say I'm thrilled about that because it means that I might have to do some actual work rather than outsourcing everything to AI, I understand. I appreciate the help. Tks. Quote
Lee Mac Posted November 10, 2020 Posted November 10, 2020 (edited) Thank you for your kind words Jim - unfortunately in this particular operation it would be difficult to determine a 'correct' ordering applicable to all scenarios, as this could vary from application to application depending upon the type of drawing and the industry in which the program is used, though, a more advanced version of this application could potentially include an option to allow the user to specify that all blocks should be ordered by their insertion point from top-to-bottom or left-to-right for example - this is obviously not a straightforward modification of my existing program. Edited November 10, 2020 by Lee Mac Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.