Mirco, let me explain the problem.
We have some Revit template for some task automation. This template uses diffierent parameters, partly project parameters (due to historical background and our skills developing during a time) and partly shared parameters. Also there are different templates made by different authors.
Now I want to combine knowledge and databases in order to create common parameters naming, common template principlec and so on.
So, I need to collect all parameters from different projects, rename these parameters and save them in external parameters file.
That's why it;s needed to export project parameter into a shared one, but the most difficult task - to keep template usable after this. It works if done manually, using option "Export..." in a project parameter setting form - after you export this parameter, you can rename it directly in parameter file, import to new template and all features using this parameter will work perfectly. This means that somehow Revit database makes a correspondence between parameter definition and its shared representation when creates GUID.
But I don't see how can it be done using ExternalDefinition and InternalDefinition classes, cause they have no key available for both. If I will use simple DefinitionGroup.Definitions.Create(newParamOptions) function, it will simply create new different shared parameter with the same name, but the template will not work.
There certainly exist a solution if it works doing manually, but could you help me to find the way, please?