License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Divide by zero errors

Anonymous
Not applicable
I'm using the Object Explorer to proof my libraries before running them through the web publisher and I'm getting these errors in every single object.

What exactly does this error mean and where should I be looking in my scripts?
6 REPLIES 6
Anonymous
Not applicable
not a gdl expert but i'll have a go

'divide by zero error' means exactly what it says. the result is infinity which computers just don't like

i'd guess that you've got some parameter defaults set to zero. try changing the defaults to something appropriate (and setting a range delimiter in the gdl script so that they can't be set to zero)

bill
Anonymous
Not applicable
I wish it were that simple. If that were the case, you would think AC would have this problem too but it's ony the Object Explorer.
Ben Odonnell
Contributor
I have see this error before. The problem was as follows.

I had a user that had a curtin wall that was 22m long and 3.1m high.
They had vertical mullions at 3m intervals and a total of 10 mullions.

As you can see these numbers don't add up, so ArchiCAD was giving the same error message that you are getting.

To solve the problem was simple, I reduced the amount of mullions to the correct amount!

HTH.
Ben
Ben O'Donnell
Architect and CTO at BIMobject®
Get your BIM objects from bimobject.com
Oleg
Expert
Sean wrote:
I'm using the Object Explorer to proof my libraries before running them through the web publisher and I'm getting these errors in every single object.

What exactly does this error mean and where should I be looking in my scripts?
As I have no one of your library parts so I can guess only.
May be the ObjectExplorer does not initialize some global variable which you use in your calculations at division like:
1000/A_ or other glob var. I think you should check up your calculations with division. Anyway you can use debug PRINTS or TEXT2 to localize the reasons.
Anonymous
Not applicable
Oleg wrote:
As I have no one of your library parts so I can guess only.
May be the ObjectExplorer does not initialize some global variable which you use in your calculations at division like:
1000/A_ or other glob var. I think you should check up your calculations with division. Anyway you can use debug PRINTS or TEXT2 to localize the reasons.
That global is exactly what the problem turned out to be. The text size of the object label in plan view is scale dependant and using that global, when I hardcode it (use 48 vs. A_) the errors are gone.

This creates a bit of an impracticality since now I'll have to create one library for displaying on the web and another for use in a model.

Oh well.
Oleg
Expert
Sean wrote:
This creates a bit of an impracticality since now I'll have to create one library for displaying on the web and another for use in a model.
I have no the ObjectExplorer installed right now, but AFAIR a library loaded in the OE have to contain MASTER_GDL file with initialization of global variables and materials. May be you need to create a special MASTER_GDL for OE which will have a line like A _ = 48

PS: BTW may be GLOB_SCALE initialized. Try for experiment A _ = GLOB_SCALE at start your script.

Just ideas.