[Imported] Develop Tool - Display Reference to Decommissioned Points
>>Message imported from previous forum - Category:Scripts and Tips<< User: mchartrand, originally posted: 2018-10-19 20:02:52 Id:163 This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.
**_NIWTelemetry: Hello Everyone. Looking for some ideas. I have a series of mimics containing network schematics with embedded flow values / SR levels - referenced from live analogue points on the database. We are involved with a large outstation replacement project which involves decommissioning old Proteus analogue points and replacing them with new WITS analogue points. A number of schematics have been found to reference decommissioned analogue points and need to be updated to reference the new analogue point. My question is - is there anyway a script can be written to find and report any references to decommisioned points - in order to help keep the schematics up to date? Thanks in advance - open to any ideas._**
**_NIWTelemetry: Thanks very much for the reply. I will check this out and get back to you._**
dmercer: This sometimes also be done using export/import tricks.
You can export a mimic or group, remove or rename the old points, put the new points in with the same FullNames as the old points, and reimport the mimic. It often requires shuffling large number of objects though, which can take the database a long time to do. It's not always practical.
sbeadle: There are .Net client API methods 'getReferencesFrom' and 'getReferencesTo' which will do the same as the client's 'get references' menu. Just open a connection, get an object by name and call the method.
**_NIWTelemetry: Hi Dean thanks for your thoughts. Unfortunately the group which contains the mimics and schematics is in a separate area of the database from another parent folder which potentially would contained a referenced decommissioned point which would make this difficult._**
hardin4019: First thought that crossed my mind was to build a query something like this, though not tested or exactly what you might be looking for. See if this gives you a "referenced from" column and move forward from there.
_Select * From CDBPoint Where Inservice Like False AND PointType Like Proteus, and TemplateID Not Like -1_