PDA

View Full Version : Load as Share, Copy, or Version


John Scheffel
07-21-2003, 01:14 PM
Last week there was a question sent to the SolidDesigner mailing list about this topic. There were several replies which may be of interest to others so I'm copying them here.

Original Question
I have a problem with SD: when I load a pkg and after others pkg, sometimes appear the message that a part has already loaded and it is automatically shared and these parts are sometimes moved in other positions. Do you know which is the cause of this problem?
Replies
It's not a problem at all (usually). What it means is that you had already a part before, and instead of loading it again, OSDM decided to instead re-use the existing part.
SolidDesigner handles the loading of identical parts in two ways, Load as Shared and Load as copy. Your system is set to Load as shared which really isn’t a problem (until you start modifying some of the parts but want others to stay the same).
You must realize that a package file zips together part files or contents and instance data. Each part is it's own file. So when you load two package files containing the same part or assembly you are loading the same contents data per part and assembly. In essence when OSDM is set to load as share, OSDM will share all similar contents data. If that data happens to be assembly contents data then your part position may move. Since the assembly holds location data per child part.

In summary when you are working with a set of parts and assembly and save out two package files from different points in time you are not creating two entirely separate entities. Package filing does not create new contents data on each save.

You could either set OSDM to load as copy or use versioning.
You will need to add a line to your PESD_Customize file. Below are the two that I have entered and that I will de-comment out depending on which I prefer to happen in my current task. (by de-commenting I mean removing the two semi-colons from in front of the text.)

You can just cut and paste these two lines into your user pesd_customize file then remove the two semi colons from in front of the mode you would like to be in. You may only have one of these lines active or “de-commented” at a time.

;; (LOAD-CLUSTER-LOAD-MODE :LOAD-DUP-AS-NEW)

;; (LOAD-CLUSTER-LOAD-MODE :LOAD-SHARED)
You can also enter these commands on the SolidDesigner command line to change the load mode on the fly during a session.

You might want to contact CoCreate to get some info on SysIDs and Filing. Once you under stand how SysIDs work it becomes more clear why parts and assemblies must either be shared or copied if their SysID matches existing items in the model.
This is one of the most powerful and confusing areas of SD for me. As best I can figure out, parts and assemblies are identified by a system ID that is completely unrelated to the file name you save to. If you have a 1 inch bolt and you save it to a file, then extend the bolt another 1/2 inch and save it to a different file, SD thinks these are the same part, because they have the same system ID. If you have one loaded, then you load the next, SD will will share these and load the second as length of the first.

This has to do with the difference between sharing and copying parts. When you copy a part, it gets a new system ID, so if we had "copied" the 2nd bolt then lengthened it then saved it, when we loaded it we would not get the shared message and the bolt would be the correct length.

Things get really exciting when you assemblies are shared!

Does this type of info help? Maybe CoCreate has a "concepts" document on do's and don'ts for copying/sharing.
A long time ago, VDS (I told you it was a long time ago) created a pick on the menu that allowed us to turn sharing on and off at will. (Using the "load mode..." commands) I have asked CoCreate to create such a command on their own but this seems to have fallen on def ears. Maybe if enough of us ask they will hear.
HP/Agilent had a similar customization for setting the load mode. We have also recommended to CoCreate that this should be something you can set from the file load menu. Now that they have added version handling, there are actually 3 options when you load a file containing a duplicate SysID, you can load it as a share, copy to a new SysID, or load it as a version. We suggested that they add a radio button to the load form to select one of the 3 methods, but as you say they were not receptive to this idea.

What really annoys me it that it either shares or copies automatically without warning the user. This has caused lots of problems for people using SolidDesigner who didn't understand what was happening. We also submitted a suggestion that the file load process should warn the user if duplicate SysIDs exist in the file being loaded, then prompt the user for how they want to handle these duplicates (share, copy, version). A warning would at least make the user stop and think, and if they did not understand what was happening seek help. As it is, items are automatically shared or copied and the users go on their merry way, not realizing what happened until they start having problems, sometimes making irreversible model changes that they have to fix later.

Right now the only solution is better training. We've had instructors cover this topic during advanced training classes and you can see people having these "ah ha" moments where they finally understand why they have had problems in the past.
You've gotten some good responses on how shared parts work, however you mentioned that the parts moved on you as well. If you are using WorkManager you may have another problem. There are some issues you can run into if you are working in Packages and storing from there to WorkManager. The issue surfaces when you save an assembly from a Package to WorkManager, and keep the package for future work without overwriting it after the WorkManager store. Packages and WorkManager do not have a live link, so the next time you open the package the assembly will not show a link to WorkManager. If you work on the assembly from that same Package. rename it, and modify it slightly to store it as a new assembly in WorkManager all looks well. You will have two seperate assemblies within WorkManager with slight differences between them. When you load them seperately they will look correct. If you load them in the same session however the second assembly will share to the first and parts may move, or the structure of the assembly will change, to match the first assembly stored. The easiest fix is to create a new assembly and drag the parts from the initial assembly you are starting from into it, them do the store.
Here is the little goodie I think you are talking about. Simply load this as you would any other lisp routine and look for it in the Toolbox, works on both Windows and HP-UX versions of OSDM. (see attachment)

May Kung
07-21-2003, 03:24 PM
Doesn't Model Manager allow you to choose during the load process whether to Load as Share vs. Load as Copy?

Greg Gonzales
07-22-2003, 08:08 AM
As mentioned in the original post, SysID is often mystifying to new users, but is really a very powerful feature once you understand the concept. Essentially, SysID is an internal "license plate" attached to OSDM objects at the time they are created. This identification is hard coded and remains unchanged for the life of the object. When an object is copied, or unshared, a new SysID is generated and attached to the new copy, or unshared instance.

Proper use of SysID enables you to precisely control the configuration of assemblies and collections of objects you have loaded in your session. Prior to OSDM 11.50 the key rule of SysID was "the first one in wins". Applying this rule, you can automatically substitute updated, or more desirable versions of parts into your assemblies or packages by simply loading them first. Any subsequent loads of parts with duplicate SysID's would then automatically share the contents of the originally loaded part, but would still apply their own instance information (positioning, color, etc). Since SysID is attached to the internal data structure, files can be loaded from a mixture of local, database, and networked file systems and still be sorted out.

If you are leveraging an existing model into something that is really new, not just a version of the original, then you really should use copy or unshare to establish a new SysID identity for the new part.

Use of the "Load as Copy" has always been a hidden switch in SolidDesigner; and rightly so. It does enable you to load two versions of the same model at the same time, but the part that was loaded last is no longer related or interchangeable with its previous versions. The copy is made instantly, but once the new SysID is generated you cannot easily go back.

CoCreate added the new "Load as Version" as a more flexible and predictable solution to the shortcomings of SysID. This new switch is directly accessible as a checkbox on the Load dialog. When enabled, duplicate SysID's are specially tagged as they are detected and the new incoming contents is retained for comparison against the original. You have visibility of the conflict in the part browser and can interactively decide what to do; i.e. replace all original instances with a new version, or copy to a new SysID and discard the tagged version.

There are still some "corner case" uses for "Load as Copy", but it is probably best hidden from main stream use.

May Kung
07-22-2003, 04:04 PM
One user here likens the SysID to a car's VIN number. You can mod that car all you want, change the paint job, drop in a new engine, etc., etc., but the VIN remains the same.

We frequently make use of the "first one in wins" rule when it's time to update assemblies with newer children parts. For those of us using Work Manager, it simplifies updating immensely.

pkehoe
07-23-2003, 09:13 AM
Originally posted by May Kung
Doesn't Model Manager allow you to choose during the load process whether to Load as Share vs. Load as Copy?

ModelManager allows you to choose from Load as Share
and Load as Version. You cannot do a Load as Copy (which
is a good thing because it would change the SysID which
is what ModelManager uses to track which model is used
for which part).