[GiDlist] dependencies error message in .cnd file

Moderator: GiD Team

Post Reply
Mark Smith

[GiDlist] dependencies error message in .cnd file

Post by Mark Smith »

Hi
³ is an ASCII character with code 179 , if you consider it not to be than
what code do you go to (128?) but the warning about this character no longer
happens in 7.7.5b just as it didn't in earlier versions?

This new beta version has a problem in that it writes out the .dat file with
incorrect element numbering it starts with a negative number it must
interpret my .bas file differently than ver 7.7.2b. It has a line:

*operation(ElemsNum-nelem(Linear)-nelem(Tetrahedra)) *ElemsConec *MatProp(0)

which in the new version is evaluated differently?

also the GiD files format must have changed because when I then reloaded the
model in the old version I get a warning that the format is incorrect & gid
might crash! fortunately it didn't as I had not saved a backup :-(
I shall revert to ver 7.7.2b for now.
best regards
mark


-----Original Message-----
From: Enrique Escolano [mailto:escolano at cimne.upc.edu]
Sent: 03 February 2006 21:06
To: gidlist at gatxan.cimne.upc.edu
Subject: Re: [GiDlist] dependencies error message in .cnd file


This is a bug related to the character "³" . This is not an ASCII character,
and the .cnd, .mat, etc must be ASCII.

I think that this error is corrected in the 7.7.5b beta version. Please,
download it an try to load your problemtype.
Note: if you don't have the msvcr70.dll library required by this version,
can download it from
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr70
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr70 (and copy this dll
inside the gid directory)

If the error persists, please, send us the problemtype to correct it for the
next version.

In other hand, when using your problemtype in other countries, with
different encodings, or send your model to foreign users
then can't be able to read this non-ASCII files!!

If you want to use in any case this non-ASCII characters and have and
"international problemtype", last GiD beta versions can manage also *.cnd,
*.prb, *mat,... utf-8 files, then this utf-8 file can be read without
problems with other encodings, like japanese, etc.

You can write your file in utf-8 encoding, and add at the begin a line like
this:

#encoding utf-8
BOOK: Constraints
CONDITION: Point_Constraints
CONDTYPE: over points
...

This is an ignored commentary for other old GiD versions, and new versions
can know that this file uses utf-8 encoding

Note: you can convert you old file to utf-8 with a simple Tcl procedure like
this:

proc ReadExternalFileAndSaveAsUTF {oldfilename newfilename } {
set fp [open $oldfilename r]
set a [read $fp]
close $fp
set fp [open $newfilename w]
fconfigure $fp -encoding utf-8
puts $fp $a
close $fp
}

Regards

Enrique Escolano

----- Original Message -----
From: "Mark Smith" mailto:mark.smith at linx.co.uk mark.smith at linx.co.uk
To: mailto:gidlist at gatxan.cimne.upc.edu gidlist at gatxan.cimne.upc.edu
Sent: Friday, February 03, 2006 4:49 PM
Subject: [GiDlist] dependencies error message in .cnd file


I'm getting the following error message since upgrading to 7.7.2b when
loading my problem type


message 1: -----------

Error in dependencies : (const) invalid left value reference
Air_density_kg/m?
Assuming no dependencies. ({1 {{RESTORE Air_viscosity_Pa.s
#CURRENT#} {RESTORE Air_density_kg/m? #CURRENT#}}} {0 {{HIDE
Air_viscosity_Pa.s #CURRENT#} {HIDE Air_density_kg/m? #CURRENT#}}} )


the offending part in my .cnd file is:


DEPENDENCIES:(1,RESTORE,Air_viscosity_Pa.s,#CURRENT#,RESTORE,Air_density_kg/

m³,#CURRENT#)(0,HIDE,Air_viscosity_Pa.s,CURRENT#,HIDE,Air_density_kg/m³,CURR
ENT#)
QUESTION:Specify_drop_charge#CB#(1,0)
VALUE: 0


it worked with earlier versions? any ideas?

regards
mark
_______________________________________________
GiDlist mailing list
mailto:GiDlist at gid.cimne.upc.es GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
http://gid.cimne.upc.es/mailman/listinfo/gidlist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060206/9931e841/attachment.htm
User avatar
escolano
Posts: 1961
Joined: Sun Sep 05, 1982 10:51 pm

[GiDlist] dependencies error message in .cnd file

Post by escolano »

Hi Mark,

Only first 128 (0 to 127 decimal) codes are ASCII characters, 128 to 265 are extensions like ANSI, etc, and their representation can change in different countries.

In other hand, If you only expects to read an write the files using the same encoding, it must work without warnings, but it's better to use only until 127 characters, or else use utf-8 encoding (a multi-byte Unicode implementation, where ASCII characters remain unchanged and are stored in a single byte).

About the problem with the bas file. What's the bug?
If you use some like:
*loop elems
*operation(ElemsNum-nelem(Linear)-nelem(Tetrahedra))
*end elems

And for example do you only have line and tetrahedra elements, then you will obtain
ElemsNum is the element number, for example=1,2,...45
nelem(Linear) is the number or line elements, for example=5
nelem(Tetrahedra) is the number of tetrahedra elements, for example =40,
Then you must obtain usually negative numbers: 1-5-40 = -45 !!

Maybe your problem is related to the white spaces between numbers, there is some small change between versions.

About the warning when reading a last model with previous GiD versions, this is because they are some news that require small changes in the database (for example strings are stored in utf-8 format, and maybe some meshing data also changed, to use semi-structured meshes, etc).

And old version can't know this changes, and it appear your related warning about possible incompatibilities, but it's also possible that can be read without problems if there were not used this last features.

In the Files Save dialog window, you can also select "Old GiD project 7", then this new features are disregarded, and the file has exactly the old format.

Please, if some problem persists with the next 7.7.6b beta version, send us a sample, to correct it as soon as possible.

Regards

Enrique
----- Original Message -----
From: Mark Smith
To: 'gidlist at gatxan.cimne.upc.edu'
Sent: Monday, February 06, 2006 2:12 PM
Subject: RE: [GiDlist] dependencies error message in .cnd file


Hi
³ is an ASCII character with code 179 , if you consider it not to be than what code do you go to (128?) but the warning about this character no longer happens in 7.7.5b just as it didn't in earlier versions?

This new beta version has a problem in that it writes out the .dat file with incorrect element numbering it starts with a negative number it must interpret my .bas file differently than ver 7.7.2b. It has a line:

*operation(ElemsNum-nelem(Linear)-nelem(Tetrahedra)) *ElemsConec *MatProp(0)

which in the new version is evaluated differently?

also the GiD files format must have changed because when I then reloaded the model in the old version I get a warning that the format is incorrect & gid might crash! fortunately it didn't as I had not saved a backup :-(
I shall revert to ver 7.7.2b for now.
best regards
mark


-----Original Message-----
From: Enrique Escolano [mailto:escolano at cimne.upc.edu]
Sent: 03 February 2006 21:06
To: gidlist at gatxan.cimne.upc.edu
Subject: Re: [GiDlist] dependencies error message in .cnd file


This is a bug related to the character "³" . This is not an ASCII character, and the .cnd, .mat, etc must be ASCII.

I think that this error is corrected in the 7.7.5b beta version. Please, download it an try to load your problemtype.
Note: if you don't have the msvcr70.dll library required by this version, can download it from
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr70 (and copy this dll inside the gid directory)

If the error persists, please, send us the problemtype to correct it for the next version.

In other hand, when using your problemtype in other countries, with different encodings, or send your model to foreign users
then can't be able to read this non-ASCII files!!

If you want to use in any case this non-ASCII characters and have and "international problemtype", last GiD beta versions can manage also *.cnd, *.prb, *mat,... utf-8 files, then this utf-8 file can be read without problems with other encodings, like japanese, etc.

You can write your file in utf-8 encoding, and add at the begin a line like this:

#encoding utf-8
BOOK: Constraints
CONDITION: Point_Constraints
CONDTYPE: over points
...

This is an ignored commentary for other old GiD versions, and new versions can know that this file uses utf-8 encoding

Note: you can convert you old file to utf-8 with a simple Tcl procedure like this:

proc ReadExternalFileAndSaveAsUTF {oldfilename newfilename } {
set fp [open $oldfilename r]
set a [read $fp]
close $fp
set fp [open $newfilename w]
fconfigure $fp -encoding utf-8
puts $fp $a
close $fp
}

Regards

Enrique Escolano

----- Original Message -----
From: "Mark Smith" mark.smith at linx.co.uk
To: gidlist at gatxan.cimne.upc.edu
Sent: Friday, February 03, 2006 4:49 PM
Subject: [GiDlist] dependencies error message in .cnd file


I'm getting the following error message since upgrading to 7.7.2b when
loading my problem type


message 1: -----------

Error in dependencies : (const) invalid left value reference
Air_density_kg/m?
Assuming no dependencies. ({1 {{RESTORE Air_viscosity_Pa.s
#CURRENT#} {RESTORE Air_density_kg/m? #CURRENT#}}} {0 {{HIDE
Air_viscosity_Pa.s #CURRENT#} {HIDE Air_density_kg/m? #CURRENT#}}} )


the offending part in my .cnd file is:

DEPENDENCIES:(1,RESTORE,Air_viscosity_Pa.s,#CURRENT#,RESTORE,Air_density_kg/
m³,#CURRENT#)(0,HIDE,Air_viscosity_Pa.s,CURRENT#,HIDE,Air_density_kg/m³,CURR
ENT#)
QUESTION:Specify_drop_charge#CB#(1,0)
VALUE: 0


it worked with earlier versions? any ideas?

regards
mark
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060206/ea9d288c/attachment.htm
Post Reply