problem type Transformation

Moderator: GiD Team

Post Reply
theokart
Posts: 11
Joined: Mon Mar 14, 2016 11:38 am

problem type Transformation

Post 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!
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: problem type Transformation

Post 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 ...)
theokart
Posts: 11
Joined: Mon Mar 14, 2016 11:38 am

Re: problem type Transformation

Post 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?
theokart
Posts: 11
Joined: Mon Mar 14, 2016 11:38 am

Re: problem type Transformation

Post 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!
Post Reply