sppider
01-27-2010, 09:03 AM
This is free for members only. Here is how it works:
ver 1.1 edit:
Extract the dtcom.ini file to your Reference Data folder. Then open the ini file and type the names of the SOURCE and DEST (destination) fields you will be using. These must be the database field names and not the alias names.
Extract the dtcom.dll to your C:\Program Files\SmartPlant\P&ID Workstation\Program and register it. Start > Run > "regsvr32 C:\Program Files\SmartPlant\P&ID Workstation\Program\copyProp.dll "
Open DDM and double click on the SOURCE field. This is the field you want to grab the data from. In the ValidationID box, type "copy.copyProp" (w/out quotes)- then save/close.
If the ValidationID box is already populated, you can put the copy.copyProp value in the ProgID of the source field in item tag config.
NEW FOR ver 1.1 - SQL Query function - OK so first let me say that you could seriously mess things up if you don't know what you're doing here and I accept 0 responsibility if you do! You have been warned. To enable the use of SQL query function: change the UseSQLStatement value to 1 > Enter a valid connect string to your project database > Enter a valid SQL statement. When the dll gets called, the SQL query will be executed and a single string value will be returned and inserted into the DESTINATION field.
The dll's function is to copy the property defined in the ini files sourceproperty to the destproperty for that object. Handy for copying values from one field to another automatically. Such as operating temperature to insulation temp.
*Remove the 2k7 or 2k9 from the DLL name before registering it. The name should only be copyProp.dll. Hope it helps!
The way it's set up by default is to copy the ItemTag into the Name field, but you should be able to use any properties you want. Good luck!
ver 1.1 edit:
Extract the dtcom.ini file to your Reference Data folder. Then open the ini file and type the names of the SOURCE and DEST (destination) fields you will be using. These must be the database field names and not the alias names.
Extract the dtcom.dll to your C:\Program Files\SmartPlant\P&ID Workstation\Program and register it. Start > Run > "regsvr32 C:\Program Files\SmartPlant\P&ID Workstation\Program\copyProp.dll "
Open DDM and double click on the SOURCE field. This is the field you want to grab the data from. In the ValidationID box, type "copy.copyProp" (w/out quotes)- then save/close.
If the ValidationID box is already populated, you can put the copy.copyProp value in the ProgID of the source field in item tag config.
NEW FOR ver 1.1 - SQL Query function - OK so first let me say that you could seriously mess things up if you don't know what you're doing here and I accept 0 responsibility if you do! You have been warned. To enable the use of SQL query function: change the UseSQLStatement value to 1 > Enter a valid connect string to your project database > Enter a valid SQL statement. When the dll gets called, the SQL query will be executed and a single string value will be returned and inserted into the DESTINATION field.
The dll's function is to copy the property defined in the ini files sourceproperty to the destproperty for that object. Handy for copying values from one field to another automatically. Such as operating temperature to insulation temp.
*Remove the 2k7 or 2k9 from the DLL name before registering it. The name should only be copyProp.dll. Hope it helps!
The way it's set up by default is to copy the ItemTag into the Name field, but you should be able to use any properties you want. Good luck!