Quantcast
Channel: [Archived] elcoCAD | Promis.e
Viewing all articles
Browse latest Browse all 3874

Wiki Page: Remove Unplaced Devices

$
0
0
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 Select the BOM Explorer tab of [[Project Manager]]. Tabs are along the bottom of Project Manager. 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. Select the BOM Explorer tab of [[Project Manager]]. Tabs are along the bottom of Project Manager. 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. First make a copy or [[Backup Project|backup]] of the problem project using [[Project Manager]]. Run SQL Server Management Studio (SSMS) and connect to the server hosting the project database. See [[Setup]] to determine the server. Click the New Query button in SSMS and paste in the following text: SELECT id, name, prjpath FROM promise.dbo.Project Replace "promise" in that statement with the true name of the project database, which may be different. See [[Setup]] to determine database name. With no part of the statement highlighted, click the Execute button. 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. 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)); Replace "promise" in the first line with the true name of your database. Replace all instances of "9999" with the id number you found in step 6. With no part of the script highlighted, click the Execute button. Review BOM Explorer or [[Run Reports|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

Viewing all articles
Browse latest Browse all 3874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>