Hello,
I was wondering if anyone could help me. I'm running AutoCAD Electrical 2013 and using the Bill of Materials Report for Panels. I notice that when a sub assembly is listed in the BOM, It comes under the parent part, but it does not get an Item number. This makes sense because it's the same item number as it's part of the same part. Is there any way to make a user post to copy the item number from above and push it into the table? Yes you would have duplicate Item numbers but it wouldn't be incorrect as they point to the same thing on the drawing. I tried writing it myself using the User Post 2 as an example but it keeps failing. Any help would be appreciated.
Solved! Go to Solution.
Solved by PatMurnen_Adsk. Go to Solution.
I think the attached file will work as user function 3. Basically it reads the item value and saves it in a variable to compare to the next record. It also saves the drawing index (dwgix) and the handle to from the record so it can compare and make sure that the next record is for the same component and not just a component with a blank item value.
Anyway, give it a try and see if it does what you want. I didn't do much testing so it might need some tweaking.
Make sure to rename it to bompnl.lsp and place it in the support folder it came from.
Regards,
Pat Murnen
Matthew,
Glad that worked out.
Regards,
Pat
Pat,
I was wondering if you know how to change the dialog for the User Post options. Right now, options 1 and 2 are the defaults and say what they do. Optoin 3 just says "user post 3". I checked the LISP, but the dialog is not getting it from here. Do you know where I can edit this? Thanks.
Sure. Each user post .lsp file has a matching .dcl file that defines the dialog. So the bompnl.lsp file has a bompnl.dcl file in the same folder. You can edit this with a simple text editor like Notepad.
In the default bompnl.dcl look for -
:toggle{key="user3";
label=/*bompnl_dcl_008*/"User function 3";
}
Change the text to whatever makes sense to you. For example,
:toggle{key="user3";
label=/*bompnl_dcl_008*/"Item Number Update";
}
If you ever need more than 3 options in the user post you can add more toggles for example,
:toggle{key="user1";
label=/*bompnl_dcl_006*/"QTY x SUBQTY x USER1 unit cost = USER2 total";
}
:toggle{key="user2";
label=/*bompnl_dcl_007*/"QTY x SUBQTY --> QTY, blank out SUBQTY";
}
:toggle{key="user3";
label=/*bompnl_dcl_008*/"User function 3";
}
:toggle{key="user4";
label=/*bompnl_dcl_009*/"User function 4";
}
The important part is the key value. It must be unique within the .dcl file. It is what links the button\check box to the code in the .lsp file that tells it what to do when you pick it. So if you added another check box in the .dcl you would just add the corresponding code in the .lsp file, using the existing code options as an example to add #4.
Hope this helps,
Pat
Pat,
Perfect, thanks! It's also good to know you can have more than 3 User Post routines.
Yes, I've seen some that have more than 10 options in a user post. It really extends the flexibility of the reporting function.
Regards,
Pat
Can't find what you're looking for? Ask the community or share your knowledge.