Move a Type between Projects |
Post Reply |
Author | |
jlafer
Member Joined: 29.Jan.2012 Points: 5 |
Post Options
Thanks(0)
Posted: 15.Nov.2016 at 20:00 |
Hello,
Is there a way to move a few Types defined in one project to another project? Both projects are in the same repository. I am doing refactoring and would like to organize (and eventually secure) the projects differently. Thanks, John
|
|
stevek
MetaCase Joined: 11.Mar.2008 Points: 641 |
Answer Post Options Thanks(0) |
Hello John,
You can certainly make a repository where those types would be in a different project: create a new repository with the desired projects, and use Type Manager to export types, separating them into a file per desired project. The later files can also contain types from earlier files: they'll just be updated, without changing the project they are in. You can then export and import the models similarly with Graph Manager. In both phases an easy way to separate things as you want is to create a new temporary graph type or graph that refers to just the elements you want in a given project. Actually changing the project of a type or instance in-place in a repository isn't possible. The problem is the references from other objects, e.g. every instance refers to its type by pointing to the type's area ID and object ID. If the type were moved to a new project, all those references would break. For instances, you can effectively achieve a move within a repository by copying with Replace to correct the references, then deleting the original (see the recent question on moving a graph between projects); for types this option isn't available, as having an identical duplicate type would be illegal. You can of course simply create a new type with the same user-visible name, if you don't have instances that you need to maintain. You'd then just need to edit the other types that refer to the original, making them point to the new one instead (Type Info will show you what needs doing). Renaming the old type by appending XXX helps avoid the confusion of two types with the same name. All the best, Steve
|
|
jlafer
Member Joined: 29.Jan.2012 Points: 5 |
Post Options
Thanks(0)
|
Thanks Steve. Putting the types to be moved in a temporary project for use in the Type Manager made that a simple operation.
Regards, John
|
|
Post Reply | |
Tweet |
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |