AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

User post script for custom Panel BOM export

1 REPLY 1
Reply
Message 1 of 2
k_van_den_bulcke
626 Views, 1 Reply

User post script for custom Panel BOM export

Hi,

 

I am hoping to find someone with scripting knowledge (unfortunately I have none...).

In order to automate our Logistics process we want to be able to upload our bill of materials directly in to our logistics system.

In order to do that I need the export BOM's to have a certain format, I have come a long way with the standard Acad features but I still need to do some things in excel for each BOM.
As we export a BOM per location, and we have a lot of locations, that means a lot of work to be done manually.

In the added file "Export as is" I would need the folowing:

  • In the Location column:
    • remove all text after the first comma so only one location value remains in each row.
    • in that location value, remove all text in front of and including the "=" symbol (so in this example only "221" will remain once in each row.
  • In the quantity column:
    • First the existing standard Acad script "QTY x SUBQTY-->QTY, blank out SUBQTY" should be in this script.
    • When the above script is completed the "Sub quantity" column should be removed.
    • The values in the "Quantity" column should be copied to the "Quantity2" Column (so quantity an quantity2 need to be identical).
  • Last actions:
    • The column headers should be deleted
    • In excel, if possible, all values need to be numbers without decimals (not text or any other format).

  • Acad attribute names for the column headers:
    • Location = LOC
    • Leave blank1 = BLANK1 (is a user attribute)
    • Leave blank2 = BLANK2 (is a user attribute)
    • RZ Article number = CAT
    • Quantity = QTY
    • Quantity2 = QYT2 (is a user attribute)
    • Sub-quantity = SUB

I have added a second file "Wanted result" which I modded manually as an example of what it would need to look like.
If I make automatic report files per location including this script I would be able to have this fully automated.
Would anyone be willing to write this script for me? (if it is possible at all).

 

Thanks in advance!
Kenneth

Labels (3)
1 REPLY 1
Message 2 of 2
Icemanau
in reply to: k_van_den_bulcke

Have you tried using the Report Format tools?

 

Using these tools, you can change how the reports look, what gets reported and even the column names.

 

Start by selecting the closest format to what you want. I suggest the 'Normal Tallied Format'.

Select a location.

When the report has been run, click on the Change Report Format button in the bottom right.

Make sure the fields you want listed are in the 'Fields to report' box.

Now select each field in the report and rename them as required using the box ABOVE the OK button.

Finally, click on 'OK+Save As' to save the format.

 

This should get you a lot closer to your desired output without having to do a lot of script writing.

 

Regards Brad

>

Brad Coleman, Electrical Draftsman
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

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

Post to forums  

Autodesk Design & Make Report