I'm trying to add a "line number" to a BOM report, but I'm having troubles. There doesn't seem to be a way to create a formula that goes 1, 2, 3, 4, etc. Am I missing something obvious?
SolidworksElectrical
I'm trying to add a "line number" to a BOM report, but I'm having troubles. There doesn't seem to be a way to create a formula that goes 1, 2, 3, 4, etc. Am I missing something obvious?
SolidworksElectrical
Sorry to be the bearer of bad news but SWE does not do item numbers. The expect you to use SW3D for your panel and that is how you get item numbers into your schematic. I had a long discussion with the heads of my VAR about how disappointed I was that something this basic was missing from SWE.
You also cannot export the table to Excel and import it back in directly. I had to go through a multi-step process (using Draftsight) to get this to happen.
I was hoping for some tricky formula hack to make it work
There are no item balloons available either on the panel layouts. I was really disappointed.
I asked the same thing in December and the conclusion was basically, can't be done.
https://forum.solidworks.com/thread/214347
Oh man, YES this can be done, it's not that tricky but I am currently on my phone without access to my computer. Please keep an eye on this thread and I'll have your answer as soon as possible.
Following!
Following as well.
Okay, thank you all for your patience as I ran through some various options with mixed results but I think in the grand scheme of things you will like the outcome.
There is an sql command 'ROW_NUMBER' that can be used in the reports to create a variable (integer) based on another variable in your query. So as an example for a cable report I can create a ROW_NUMBER statement based on the cab_tag variable that will produce a result like this:
The query for this is: (Notes: DON'T FORGET to add the comma noted with the red arrow)
Here is a link to a Microsoft article on the ROW_NUMBER statement: ROW_NUMBER
This works well for things like wire and cable reports but I found that if there are multiple select statements you have to switch to the statement DENSE_RANK (LINK).
I had issues getting it to work with the BOM queries provided, but I attribute this more to my skills (or lack of) and time. So here is what I did, I created my own BOM report which I have included in this post as an report archive (I am using SWE 2018) so I have included the archives of my cable, bom and text file for the bom).
END Result:
SQL Statement:
Link to archives and text file: DOWNLOAD
Which version of SW Electrical did you get this working for? It seems that something in the Advanced editor mishandles SQL queries. I can successfully execute your report but if i go into Advanced mode and click Test on your query it breaks just like any of my queries were. Since they are using the Test functionality to limit your saving capability you cant make really any edits through the report. I am using SW Electrical 2019 SP03 (also tried this in SP02 with no success.) I have gone as far as executing my queries using SQL Server Management Studio of which all my queries work and operate as expected.