we do it by .HKP files.
Now how can it be done by automation?
# example with any language will be welcome
We are using the DxD to Expedition design flow with Library Manager (EE2007.7), so I use Library Services to move or copy specific pieces or an entire Part from one partition to another depending on what it is I am doing.
Is it possible to do it with Automation?
sorry for the incomplete subject.
How to move a library part from one partition to another by automation?
Did the automation script provided not work?
We got it just last evening and did not have the time to test it.
In the HKP to Automation Migration Community, I added a new thread called HKP Automation Solution Space if you have a script to test or share please post it there so we all can see the example.
I expected a high level command mimicking the library editors RMB menu "move" command.
The program is a ~900 line VBS program that does lower level collecting all the data of the part and generating the new part in the destination partition with this data.
Maybe David Wood should share the program or I should ask his approval as it was written by Mentor.
Nevertheless, Mentor should release the hkp option because the automation solutions are not all mature and also because it will take some time to adopt the automation solutions.
Sharing the automation programs is a good Idea. thanks.
I am now in the same situation, that I have to split one partition into three or more. Since there are 10,000 parts (resistors and capacitors) to move, the RMB command "Move Part" is not suitable. For automation I didn't find the move function, even in EE7.9.1.
I can of course choose the hard way and create a new part with a new name, then move everything - which I am aware of - from the old part to the new part, then delete the old part and rename the new part. I can't believe, that there should be no command available to support this, even if it is not documented. Copying the entire partition via HKP is not a very good alternative, since I have to use decrypt/encrypt, look for part information in the ASCII HKP, delete all overhead and then import the new partitions again. All this could be very easy, if the command MovePart would be available for automation.
Has anyone newer informations on this issue?
I requested the Move method of the partition object in PartDB and CellDB.
But since there is no customer who needs, it is postponed.
Please request, if needed.
You could still use export/import HKP. Even without having to decrypt/crypt..
From the command line you can do:
PartsDB2HKP -i <full path to pdb file> -o <full path to hkp file> -n <partnumber>
Now if you create a separate hkp file for each part you can remove the 'from' pdb file
and recreate it with the 'leftover' parts and load the 'to bemoved parts' into the target pdb file
HKP2PartsDB -i <full path to hkp file> -o <full path to pdb file> -c <full path to lmc> (you may need the -r switch here)
The trick of course is to get the initial list of parts...
Do you think that "there is no customer who needs,"???
We were told that it will be in 7.9.1.
Thanks for the tip.
Do you think that this is a long lasting solution?
If Mentor doesn't encourage hkp usage they may eliminate also the 'PartsDB2HKP' and 'HKP2PartsDB' from new releases.
We would like to see a proper automation support for all library services options.
I agree, it would be the best solution to all if Mentor would give us
some sort of easy dumping/restoring mechanism.
As to how long this 'hkp' method will be there, I cannot answer that.
Mentor has told us they are moving away from ascii output, but have
not said they will take away the 'encrypted' files. And (somebody correct
me if I am wrong) they have rewritten some of their tools (f.i. LP Wizzard)
to create the encrypted files.
I was not able to find Move method in the Library Automation of EE7.9.1.
I needed this method and requested.
But the status of this request is "Postpone"...
I think everyone needs this method.
I registered this in the idea site.
If you need this method, I want you to click "Promote".
@Taco: The HKP2PartsDB is not working as expected (EE2007.7). If the new partition does not exist, the PDB file is indeed created, but not added to the LMC. We have to re-polulate the LMC first.
And: If I extract one part with PartsDB2HKP and then write it back to a new partition with HKP2PartsDB, the part is not moved. I can only add a part, that has a different part number, no matter if I use -r (Replace) or -w (Overwrite) as an option. The log file doesn't look bad.
Expedition PCB Design Data to PartsDatabase Log -----------------------------------------------
Design Data PDB : x.hkpPDB : D:\LIB\PartsDBLibs\CapCeramicC0G.pdbCentral Library : D:\LIB\LIB.lmcCommon Property File: D:\LIB\CentLib.prp
Processing Part 'F_C1206C919K8GAC'
Created 'D:\LIB\PartsDBLibs\CapCeramicC0G.pdb' successfully.
What are the -r and -w options doing? I assume, they are only relevant within a single PDB file, but what is the difference. And how could a part be moved without changing the part number (which require decrypt/encrypt) or deleting it first in the old partition?
The hkp tools work on a single pdb, and can be used to create/update parts in that pdb.
You cannot delete.
But what you can do is run the hkp extract/import from vbs inside Library Manager
and use the methods available to delete a part from a partition.
So you could do something like this:
- extract the part to a hkp using PartsDB2HKP
- remove the part from that partition
- test if the target pdb exists, and if not create it with PartsDB.Partitions and PartsDB.NewPartition
- use HKP2PartsDB to import the part into the target partition.
Right now I don't have the time to come up with the code, but this should work.
You could also loop over each item in a part and recreate the part in the target partition using vbs,
but right now the hkp method seems much easier.
Note: look at the documentation, the library methods are described with examples in
a pdf file called library_editors_auto.pdf located in the pdfdocs folder.
As to what the difference is between -r and -w..
My best guess is this:
- r replace but only if the timestamp is newer
-w unconditionally replace
But there might be a bright spirit within Mentor that can answer this, I don't seem to
be able to locate the help for that command..
Retrieving data ...