PDA

View Full Version : Copy or 'paint' data command



Data Wrangler
11-06-2006, 07:53 AM
It would be nice to have a routine that could copy selected fields from one object to another. Say you have a valve in a line and added another. It would be nice to 'copy attributes' and have the service, description, model number etc. copied across.

D

PeterJ
11-06-2006, 11:42 AM
I have written such a tool, will post it here later this week

dave
11-06-2006, 12:57 PM
Thanks Peter! I wish I was PeterJ :)

PeterJ
11-06-2006, 04:21 PM
Here are 2 versions of the pidcopy tool.
-pidcopy is easy to install, but works slow (configuration in .ini file)
-pidcopy2 works fast, but requires some database manipulation because the configuration file is in the projdata database.

check http://www.davetyner.com/forum/showthread.php?t=257
for automatic loading of lisp files.

This code is part of the free additions I offer to all my clients, hope it helps you.

dave
11-06-2006, 08:31 PM
Peter, thanks for this routine. I just tested it out and it works pretty good. Question, is it supposed to work on user added fields as well?

I have all of my equipment created under the AT_EQUIP tag type. In the Equip field I added:

PRL_LN01
PRL_LN02
etc..

When I did a pidcopy command on my equipment, it only updated the EDESC field not the PRL_LN01... fields. The first thing I checked was PA but all of the custom fields are enabled.

PeterJ
11-07-2006, 01:46 AM
Dave,

add the new fields you want to copy to the pidcopy.ini or in the pidcopy table.

Data Wrangler
11-07-2006, 05:33 AM
Wow, very nice... pretty much what I was describing. Customizable, too... Thank you very much!

Derek

dave
12-12-2006, 09:17 AM
Peter, just getting back to this. I added my custom fields to the pidcopy.ini but they still aren't being copied when I run the COPD command. This is the case only on my AT_EQUIP tag type. Any ideas?

PeterJ
12-12-2006, 11:12 AM
which version are you using, the one with the ini file or with the database table ?

PeterJ
12-12-2006, 11:28 AM
sorry, stupid question, you mention the pidcopy.ini .... I'll give it a test

HybridAWD
12-12-2006, 01:22 PM
so which one is the ideal one to use? When it's said to be "slow" how slow are we talking?

PeterJ
12-12-2006, 01:52 PM
on my system : 6 seconds for the ini, 1 sec for the database. And that for each item you select that needs to get the data.

PeterJ
12-12-2006, 01:56 PM
Dave, can you mail me your pidcopy.ini ? I tried to copy new fields and it works fine

dave
12-12-2006, 04:28 PM
Here you are Peter, thanks! I renamed it to pidcopy.txt for the upload.

PeterJ
12-13-2006, 03:54 AM
Dave, the [AT_EQUIP]-group is present at 2 locations in the INI file (You addeda new one while it was already present). the program will take the last one ...

dave
12-13-2006, 07:16 AM
doh! Thanks PeterJ!

Apog
12-22-2006, 05:59 AM
how to copy PROCESS and PIPERUN? if i want to copy only PROCESS or PIPERUN information??

dave
03-25-2007, 12:10 PM
Peter, what would it take to make a "paint spec" routine?