Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Library part

Anonymous
Not applicable
I recently dowloaded this library part from vis2real.de, tried to put it in a document but unfortunately a string of errors regarding the 3d script pops up. As I have no idea what the errors mean, could someone please help out?

Cheers in advance
6 REPLIES 6
David Maudlin
Virtuoso
zoltar:

The problem is at line 84 of the 3D Script:
resol res
Where resol, which sets the resolution of the cylinders in the script has a variable of res which has not been defined. The simplest fix is to change this line to:
resol 12
which will give the cylinders 12 facets. As far as I can tell, the cylinders are relatively small parts, and this gets smoothed in renderings anyways, so I don't see a need for a higher resolution (which generates more polygons), but you can give it a higher number if you wish.

A more complicated solution is to make a new parameter for user control of this variable, but I also see that the materials are defined in the Master Script, so the user does not have alot of control over this object anyway.

You should add a Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Anonymous
Not applicable
David

thank you for your promt and thorough answer. However this is what happened. I went down to line 84 and I put 12 next to res and got a message that said "no comma in line 84", so I put a comma in and get another message saying "too many parameters in line 84". Also there seems to be a problem in line 28 of the 3d script. Something about a "non-instanced, non-initialized parameter". I'm using the greek localized version so as the message makes no sense to me I might be off with the translation.

Thank you again in advance
David Maudlin
Virtuoso
zoltar wrote:
I went down to line 84 and I put 12 next to res and got a message that said "no comma in line 84", so I put a comma in and get another message saying "too many parameters in line 84".
The code should look like this (I have added the lines before and after the altered code:

material matm
resol 12

add a1-0.05, 0, -d-0.03


So make sure that this is the exact code, GDL does not allow minor mistakes. The resol command take only one variable, so there should be no comma, you can read about this command in the GDL manual. You might want to make sure that you are on the correct line of the script, there is a "Go to Line..." command available when editing library parts, I have added it to the Edit menu, but you may need to add this to your Work Environment as I don't know if it is there in the default Work Environments.
zoltar wrote:
Also there seems to be a problem in line 28 of the 3d script. Something about a "non-instanced, non-initialized parameter". I'm using the greek localized version so as the message makes no sense to me I might be off with the translation.
This refers to the line:

if mir1=1 then

which I think has to do when the part is mirrored (just a guess), where the variable mir1 has not been defined, so this is just a warning but does not affect the running of the script, so you can leave it alone, this warning will appear when checking the script but not when the script is run.

The ideal solution for these issues would be to contact the author of this part so he/she can correct it (there is a copyright notice and name at the top of the 3D Script) and post a better version, but this is not a bad way to learn a bit about GDL.

HTH

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Anonymous
Not applicable
David,

I did as you said and placed a 12 next to resol and everything worked like a charm. Thank you very much.

PS The Go to line command is in the Edit menu after I open the 3d script?
Anonymous
Not applicable
Sorry

scratch that, I found it.
David Maudlin
Virtuoso
zoltar:

Glad to read that you got it to work, thanks for letting us know.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14