Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
OpenUtilities
  • Product Communities
  • More
OpenUtilities
OpenUtilities Wiki Remove Unplaced Devices
    • Sign in
    • +OpenUtilities
    • Access Service Request Manager
    • +Bentley sisHYD Multi Utility
    • Design Features - promis.e Functionality - Promis.e Standard
    • -OpenUtilities Substation
      • +CONNECT Edition - OpenUtilities Substation
      • +3D Layout Features - Bentley Substation
      • About Bentley Substation
      • +Administration Features - Bentley Substation
      • +Automation Features - Bentley Substation
      • +Component Management - Bentley Substation
      • +Construction Drawings - Bentley Substation
      • +Database Platform Support - Bentley Substation
      • +Grounding Grid - Bentley Substation
      • How to log Service Request
      • +Installation_Configuration - Bentley Substation
      • +Interoperability - Bentley Substation
      • +PowerPlatform Support - Bentley Substation
      • -Project Management - Bentley Substation
        • +Backup and Restore Project - Project Management - Bentley Substation
        • How to rename a Project/Workset in Substation CONNECT
        • +Project Manager - Project Management - Bentley Substation
        • Remove Unplaced Devices
      • +ProjectWise Integration - Bentley Substation
      • Working from home with OpenUtilities Substation
    • Promis.e Paths
    • +Promis.e Wiki
    • Replace Family - Find_Replace - Promis.e
    • SQL Server Login

     
     Questions about this article, topic, or product? Click here. 

    Remove Unplaced Devices

      Product(s): Promis.e, Bentley Substation
      Version(s): through 08.11.13.96
      Environment: N/A
      Area: Project Management
      Subarea: BOM Explorer

    Devices and/or part numbers are appearing on reports but I can find no evidence of them in the project.  There are no symbols placed for these devices, but they are affecting the quantity on the bill of materials. I see device tags surrounded by square brackets on dialogs.

    Background

    These devices may have been added using BOM Explorer, imported into the project, existed as symbols that have since been deleted from the page, or left behind by some other workflow. This article refers to devices for which no symbols are placed on project pages as unplaced devices. This article assumes these devices are no longer wanted in the project.

    Remove individual unplaced devices

    1. Select the BOM Explorer tab of Project Manager. Tabs are along the bottom of Project Manager.

    2. Devices in the project that have no symbols inserted should appear with the ID icon in a darker/bold color and the device tag may be surrounded by brackets. Right-click such device tags and select Remove.

    Remove all unplaced devices

    Option 1 - Use the Remove Unplaced Devices tool (SS7 and newer only)

    The Remove Unplaced Devices button was added to the BOM Explorer tab of Project Manager in SELECTseries 7 (08.11.12.xx).  It removes all devices that have no associated symbols placed in the project.

    1. Select the BOM Explorer tab of Project Manager.  Tabs are along the bottom of Project Manager.

    2. The Remove Unplaced Devices button is near the top of the BOM Tree pane.

    Option 2 - Execute an SQL script

    Use this method at your own risk. This process performs the same operations as the Remove Unplaced Devices button, so when available, use Remove Unplaced Devices. If this button is not present on BOM Explorer, consider upgrading to the latest version.

    1. First make a copy or backup of the problem project using Project Manager.
    2. Run SQL Server Management Studio (SSMS) and connect to the server hosting the project database.  See Setup to determine the server.
    3. Click the New Query button in SSMS and paste in the following text:

      SELECT id, name, prjpath FROM promise.dbo.Project

    4. Replace "promise" in that statement with the true name of the project database, which may be different. See Setup to determine database name.
    5. With no part of the statement highlighted, click the Execute button.
    6. In the results, find the problem project's name, confirm it is the correct project by looking at the prjpath field, and note the id value for that project.
    7. Click the New Query button in SSMS and paste in the following text:
      USE promise
      -- Clear Unused Partnumber
      DELETE FROM partnumber WHERE part_number not in(SELECT partnumber FROM device_partnumber WHERE project_id=9999 or project_id=-9999) AND project_id=9999;
      -- Clear Unused Device
      DELETE FROM Device_PartNumber WHERE project_id=9999 AND device_id is null;
      DELETE FROM Device WHERE project_id=9999 AND (type<>N'DEVICE' OR type is null) AND id NOT IN (SELECT DISTINCT device_id FROM symbol WHERE project_id=9999 AND device_id is not null UNION SELECT device_id FROM Spare WHERE project_id=9999);
      DELETE FROM ParentDevice WHERE project_id=9999 AND (id not in (SELECT DISTINCT parent_device_id FROM device WHERE project_id=9999 UNION SELECT DISTINCT parentdevice_id FROM parentdeviceattribute WHERE project_id=9999));
    8. Replace "promise" in the first line with the true name of your database.
    9. Replace all instances of "9999" with the id number you found in step 6.
    10. With no part of the script highlighted, click the Execute button.
    11. Review BOM Explorer or run a BOM report to see if the unwanted part numbers were removed.  Do a spot check to see if any valid parts were removed; perhaps compare old and new report results.

      Original Author: Matt_P

    Keywords, duplicate, Insert Symbol, device ID

    • promis.e
    • Menu
    • Bentley Substation
    • BOM Explorer
    • en
    • Design Features
    • Project Management
    • SELECTsupport
    • Problem Solving
    • Share
    • History
    • More
    • Cancel
    • Matt_P Created by Communities MVP Matt_P
    • When: Wed, Jun 18 2014 12:31 PM
    • Michael Kelley Last revision by Bentley Colleague Michael Kelley
    • When: Mon, May 11 2020 4:18 PM
    • Revisions: 9
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies