SW Electrical Design Rule Check Problem

User avatar
JSculley
Posts: 646
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 878

SW Electrical Design Rule Check Problem

Unread post by JSculley »

SOLIDWORKS Electrical 2021 SP5.1

There is a built in design rule check named Origin destination arrow connected to different wire styles. This design rule check does not appear to do what it claims to do. I created this simple schematic:
image.png
It should pass the design rule check with no issues, but every origin-destination symbol ends up in the report:
image.png
Does anyone have a fix for this report or the SQL for a report that actually does what this one claims to do?
User avatar
JSculley
Posts: 646
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 878

Re: SW Electrical Design Rule Check Problem

Unread post by JSculley »

After further investigation, the different wire styles aren't even the source of the bad behavior. I can change things so that there are only three wire styles:
image.png
and the report fails the same way. So, the source of the problem is the fact that there are multiple wires connected to each terminal. Our schematics are full of these types of connections so I'll have to keep looking for a way to correct the report.
User avatar
JSculley
Posts: 646
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 878

Re: SW Electrical Design Rule Check Problem

Unread post by JSculley »

Here's the SQL I came up with:

==============================================================

Code: Select all

SELECT *
FROM   tew_linewirepair
       LEFT JOIN tew_wire
              ON tew_linewirepair.lwp_wir_id = tew_wire.wir_id
       LEFT JOIN tew_line
              ON tew_line.lin_id = tew_linewirepair.lwp_lin_id
       LEFT JOIN tew_linktype
              ON tew_line.lin_lty_id = tew_linktype.lty_id
       LEFT JOIN tew_file
              ON tew_file.fil_id = tew_line.lin_fil_id
       LEFT JOIN tew_translatedtext
              ON ( tra_strobjectid = ]]fil[[​​​​​​​
                   AND tew_file.fil_id = tew_translatedtext.tra_objectid
                   AND tew_translatedtext.tra_lan_strid = ]]%PROJECT_LNG_CODE%[[)
       LEFT JOIN tew_symbol
              ON ( ( tew_line.lin_ptstartx = tew_symbol.sym_posx
                     AND tew_line.lin_ptstarty = tew_symbol.sym_posy )
                    OR ( tew_line.lin_ptendx = tew_symbol.sym_posx
                         AND tew_line.lin_ptendy = tew_symbol.sym_posy ) )
       LEFT JOIN tew_symbolpt
              ON tew_symbolpt.spt_sym_id = tew_symbol.sym_id
WHERE  tew_symbol.sym_blocktype = 85
       AND lwp_wir_id IN (SELECT lwp_wir_id
                          FROM   (SELECT lwp_wir_id,
                                         lin_lty_id
                                  FROM   tew_linewirepair
                                         LEFT JOIN tew_line
                                                ON tew_line.lin_id =
                                                   tew_linewirepair.lwp_lin_id
                                         LEFT JOIN tew_symbol
                                                ON ( ( tew_line.lin_ptstartx =
                                                       tew_symbol.sym_posx
                                                       AND tew_line.lin_ptstarty
                                                           =
                                                           tew_symbol.sym_posy )
                                                      OR (
                                         tew_line.lin_ptendx =
                                         tew_symbol.sym_posx
                                         AND tew_line.lin_ptendy =
                                                         tew_symbol.sym_posy ) )
                                  WHERE  tew_symbol.sym_blocktype = 85) AS
                                 tablecolumns
                          GROUP  BY lwp_wir_id
                          HAVING Count(DISTINCT lin_lty_id) > 1)
ORDER  BY lwp_wir_id ASC 
==============================================================



For my test schematic above, it returns no results, which is expected. If I change a single line to have a different style:
image.png
I get the correct results:
image.png
I still have to replace the '*' after the first SELECT with individual column names to make it more efficient, but it works.
Post Reply