Page 1 of 1

problem type Transformation

Posted: Mon Nov 06, 2017 12:12 am
by theokart
Dear GiD Team,

Is there any way to convert an old condition (condition name does not exist anymore) to a new one (new condition name) while transforming a project?

Thanks in advance!

Re: problem type Transformation

Posted: Mon Nov 06, 2017 4:48 pm
by escolano
The current GiD transform is unable to decide that an 'old condition name' must be converted to a 'new condition name' (maybe with some extra difference in its fields).

You can do some trick implementing the GiD-event

proc AfterTransformProblemType { file oldproblemtype newproblemtype messages } {
}

e.g.
not to delete 'old condition name' of the new version (but could define it as hidden), and when converting and old model (AfterTransformProblemType) ask for the applied entities and values of this condition (GiD_Info condition $name geometry|mesh), apply as your new condition (GiD_AssignData condition ...) and unassign the old one (GiD_UnAssignData condition ...)

Re: problem type Transformation

Posted: Mon Nov 06, 2017 7:10 pm
by theokart
To hide the condition, should i make a new book and hide the book (e.g. GiD_ShowBook conditions condBook 0)? or can i hide a specific condition somehow?

Re: problem type Transformation

Posted: Tue Nov 07, 2017 8:30 am
by theokart
I made a book for old conditions for compatibility with older projects. It works fine following your instructions. Thank you again for the help!