I have a design that has multiple locations (11, some are nested). I am using Solidworks Electrical 2D for project schematics and Solidworks Electrical 3D for modeling and routing. Every location has its own assembly.
Using Solidworks 2017 SP3, I am relatively familiar with SW but new into Solidworks Electrical.
In 3D space there are parts with electrical “function” (associated parts) and “mechanical” parts (like bolts, holders etc.) without association to electrical.
Some associated 3D parts are added from electrical project and some are individually inserted into assembly (via assembly’s Insert Component) and then associated with electrical components (via Solidworks 2D command Associate https://goo.gl/nBBDtN). There are plenty components without associations.
Everything is working just fine if I am adding 3D parts of components, mechanical parts etc. – building assembly.
The problem emerges at part deletion. I am dealing with this problem 1mo but yesterday I had enough of this BS.
SQL database handles all Solidworks Electrical projects and its libraries. That SQL database enables collaboration between 3D and schematics. For every project, there is database on SQL server. As far as I understand the table inside project’s database for 3D and 2D associations is tew_entity3d, with columns:
- e3d_id (unique table ID),
- e3d_objectid (SW Electrical BOM id),
- e3d_fil_id (parent file ID),
- e3d_3did (3D part ID, Component properties->Component Reference https://goo.gl/MuUmgq) and
- e3d_3dentitytype (sth…).
So, at component 3D part insertion (into Assembly) the e3d_id gets incremented and columns populated with respective data, e.g.:
For last row: e3d_id gets incremented, e3d_objectid points to BOM (electrical part with reference 1010000000, mark: XT1.4 – terminal block), e3d_fil_id points to assembly file “9154.sldasm”, e3d_3did is Component Reference in SW assembly (https://goo.gl/MuUmgq ).
I made a SQL query in excel so I can easily track changes to database tew_entitiy3d it polls information from tables tew_buildofmaterial, tew_component, tew_file for additional info (tables are inside projects database).
So, when you insert an associated 3D part (electrical component with defined 3D model) it automatically populates table tew_entity3d with data.
When you insert “regular” (unassociated) part into assembly (via Insert Component -> New Part/Assembly, Copy with Mates, Browse for part) the table tew_entitiy3d, does not get new entry. Ofc this is expected since there is no association between this 3D part and 2D schematic component.
As soon as we make this association via Associate command (https://goo.gl/LD2M8j) the table tew_entitiy3d gets updated: new row gets added.
If we dissociate component (https://goo.gl/jv7hMt) with its 3D part then the row (representing that association) from table tew_entitiy3d is deleted.
Upon the deletion of any component (associated, unassociated, mechanical, assembly) some electrical components (in various locations/assemblies of project) somehow lose their existing associations.
The table tew_entitiy3d gets updated and some rows (associations) deleted. Ofc if the associated part is deleted, the table must be updated, to remove the association of the deleted part but what SOMETIMES happens is that table tew_entitiy3d gets updated and it deletes multiple associations (rows) which results in other (still existing) parts to lose their associations to electrical component. The number of additional deleted associations are 0-5+(number vary), so sometimes this does not occur, sometimes there are 10 broken associations, even if those components are from other (opened/unopened) assemblies (locations). This happens even if I use SW Electrical command “Delete 3D model” (https://goo.gl/jv7hMt).
This problem is not project specific: it is the same in any project.
From my basic understanding, what should happen is:
Add unassociated component
Component is added
Component is added
Add associated component
Row is added
Component is added
Row is added
Row is added
Row is added
Row is deleted
Row is deleted
Delete 3D model command
Delete associated component (Edit->Delete)
Delete unassociated component (Edit->Delete)
Component is added/deleted refers to location assembly, Row is added/deleted refers to table tew_entitiy3d of project’s database.
As you can see on last 3 commands there is additional step which removes more rows/associations.
Somewhat it appears that there is DELETE SQL statement running around and interfering with my projects.
You can imagine the frustration when you associate 300 parts on one location (assembly) and then you start building another location (assembly) where you delete/insert/delete… and when you are done you open first location only to find out that there are like 20 out of 300 components still associated.
So here is one live example: right now, I have total of 333 associations (and much more parts) in all of my locations. I am going to delete inserted “normal” part (without electrical components/associations) in location L2+L5, so there shouldn’t be any modifications to table tew_entitiy3d. Deleted part:
So, after deletion of this part there are only 331 associations left, so somehow the deletion of plain old part (in L2+L5) results in deletion of 2 more associations somewhere (in this case in L1+L1) in my project. After Excel SQL pooling of database, I can identify which parts lost association:
ID is selected randomly, both are from same location L1+L1 which is the location with most parts (main electrical closet).
Maybe if we had a log of SQL statements executed to database we can better understand what is happening, well here it is:(attached .txt)
This are statements executed just after deletion of the part and we can see that it starts with:
(@1 smallint) DELETE [tew_entity3d] WHERE [e3d_id]=@1
So somehow this statement is run with some parameters just at deletion of the part and it’s clear that it modifies table tew_entity3d. The parts IDs must have been 18107 and 18270, as they are missing from the table.
I tried Solidworks 2016 SP4 and did some testing. It seems that Solidworks Electrical 2016 is working properly and 3D parts do not lose associations. Then I tried with combination of SW 2017 and SW Electrical 2016 (I had to "downgrade" the project), this too works. With Excel and SSMS SQL probing of databases I have detected that SW Electrical 2016 and 2017 handle databases differently:
- SW Electrical 2016 does not populate database “tew_entity3d” upon new associations or dissociations. This database remains always empty. It does however populate column “bom_fil_id” in database “tew_buildofmaterial” with component’s location file ID.
- In SW Electrical 2016 (in 3D) the Component Reference (in Component Properties) is the same as Component Name (Example for component XL6.4: “_XL6_4|15723”). In SW 2017, Component Name is different than Component Reference (which is always a number). I think that SWE 2016 gets associations from component's name and than matches it against component BOM id. And it seems that SWE 2016 is querying database faster than SWE 2017.
- SW Electrical 2017 populates both tables “tew_buildofmaterial” and “tew_entity3d”. But with 2017 table "tew_buildofmaterial", column "bom_fil_id" always changes when you open different location’s assembly and tew_entity3d loses entries at deletion of 3D part.
So it looks like there is a bug in Solidworks Electrical 2017 (SP0-SP4). Maybe they upgraded database/algorithms etc.
SW 2017 + SW Electrical 2016 worked - possible solution for me. As it turns out this this is not a solution - associations are all good but wire routing is somewhat broken (some wires do route, others dont). This maybe from force downgrade of SWE 2017 project to SWE 2016.
SW2017 + SWE 2016 not good solution.
It seems there is one solution but is tedious and not permanent if you later add additional new location and its assembly file. So, when you create assemblies with Solidworks cabinet layout command it automatically creates assemblies for each location, starting with parent assembly for project (it is associated with Project). This assembly is numbered (first) with smallest number (ID). And if you start using created assemblies than you will get disassociations all over the project.
It turns out that if you delete parent assembly (the one associated with Project) and then re-create this assembly the problem disappears. Now the parent is numbered with largest number (ID). And if you later add new location, then its ID will be the largest which (?) than leads to broken associations. Ofc the practicality of this solution is another matter…
Tried SW2018 SP0 and SP0.1, as I explained in the post below (on Oct 14, 2017 3:05 PM) it appears they have resolved the bug in new version but introduced another one:
broken Route wires tool - wires don't rout along EW_PATHS and the problem is more evident with command "Draw Graph" which makes total nonsense:
I thought, maybe it is like this because the project is SWE2017 originally, so I made simple SWE2018 project and this is the result:
And the routing was just wrong - all wires through center and none on PATH.
So I am done with SW2018 till SPx.x it should be an easy fix I mean, they already got it right. Unfortunately new SP wont be due for some time (2 months?).
I am looking forward to SW2017 SP5 but expect nothing .
The bug for routing persist even in 2018 SP1 and it appears it was introduced with 2017 SP5 (image result of Draw Graph command in Example assembly Elevator).
Its just a shame Solidworks couldn't solve the 2017SP5 and 2018SP1 routing bug (Draw Graph above). Maybe that one needs a topic too.
But it seems there was a progress with 2017 SP5 - there is no bug for "3D/2D losing part associations upon 3D part deletion". There was no unwanted deletion of parts, so I regard SP5 and 2018 as a solution.
Does anyone have any ideas as to why is this happening?
Is there a bug in the program (SW 3D, SQL, plugins etc.)?
Am I doing sth wrong?
Hope this elaborate makes any sense, please let me know if I need to explain it more.
Thanks in advance for helping me.