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

Calling objects?

Anonymous
Not applicable
How come when I make an object then check the script I get errors when an object (that is a basic AC object) is called I get errors. For example:

I'm making a newel post. It consists of a column, a slab and a pyramid (Pyramid 11)

Simple object, right?

When I "check script" I get errors that:

DIST_Y isn't a valid parameter name
DIST_X isnt' a valid parameter name
GAMMA isn't a valid parameter name

etc., etc.


It seems all the called parameters are invalid. I don't get why this is when it's an AC object.

Here is the whole script:

!
! Name : StdNewell.gsm
! Date : Wednesday, April 8, 2009
! Version : 11.00
! Written by ArchiCAD
!

mulx A/0'-6.5000"
muly B/0'-6.5000"
mulz ZZYZX/3'-6.0000"
addx 0'-3.2500"
addy 0'-3.2500"
rotz 270
body -1
model solid
resol 36
GLOB_SCRIPT_TYPE = 3
GLOB_CONTEXT = 3
GLOB_SCALE = 48
GLOB_NORTH_DIR = 90
GLOB_DRAWING_BGD_PEN = 91
GLOB_FRAME_NR = -1
GLOB_EYEPOS_X = 40'-10.5550"
GLOB_EYEPOS_Y = -55'-1.0332"
GLOB_EYEPOS_Z = 25'-0.0000"
GLOB_TARGPOS_X = 40'-10.5550"
GLOB_TARGPOS_Y = 24'-10.9668"
GLOB_TARGPOS_Z = 5'-0.0000"
GLOB_SUN_AZIMUTH = 332.3090550957
GLOB_SUN_ALTITUDE = 56.42999939507
body -1
body -1
GLOB_HSTORY_HEIGHT = 10'-0.0000"
!!Object-01
WALL_ID = "Wall-02"
WALL_INTGUID = "00000000-0000-0000-0000-000000000000"
WALL_RESOL = 36
WALL_THICKNESS = 0'-9.0000"
WALL_START_THICKNESS = 0'-9.0000"
WALL_END_THICKNESS = 0'-9.1250"
WALL_HEIGHT = 10'-0.0000"
WALL_LINETYPE = 1
WALL_FILL = 85
WALL_FILL_PEN = 2
WALL_SECT_PEN = 1
WALL_VIEW_PEN = 11
WALL_FBGD_PEN = -1
WALL_POSITION[1] = 0'-0.0000"
WALL_POSITION[2] = 0'-0.0000"
WALL_POSITION[3] = 0'-0.0000"
WALL_MAT_A = 68
WALL_MAT_B = 50
WALL_MAT_EDGE = 50
GLOB_ELEVATION = 3'-3.0000"
SYMB_LINETYPE = 1
SYMB_FILL = 85
SYMB_FILL_PEN = 91
SYMB_FBGD_PEN = -1
SYMB_SECT_PEN = 4
SYMB_VIEW_PEN = 4
SYMB_MAT = 18
SYMB_POS_Z = 3'-3.0000"
SYMB_ROTANGLE = 225
SYMB_A_SIZE = 0'-9.1875"
SYMB_B_SIZE = 0'-6.4965"
GLOB_CUTPLANES_INFO[1] = 4'-0.0000"
GLOB_CUTPLANES_INFO[2] = 10'-0.0000"
GLOB_CUTPLANES_INFO[3] = 0'-0.0000"
GLOB_CUTPLANES_INFO[4] = 0'-0.0000"
WALL_THICKNESS = 0'-0.0000"
pen 4
set material "09 | Paint-02 Whitewash"
GLOB_LAYER = "A-FLOR"
GLOB_ID = "Object-01"
GLOB_INTGUID = "634A70BD-A518-DC4E-9D98-C3C287CDD14A"
GLOB_ELEM_TYPE = 1
body -1
add 0'-0.0000", 0'-0.0000", 3'-3.0000"
rotz 225
call "Pyramid 11",
PARAMETERS A = 0'-9.1875", B = 0'-6.4965", ZZYZX = 0'-3.0000",
AC_show2DHotspotsIn3D = 0, gs_detlevel_3D = "Detailed",
radius_1 = 0'-4.5937", edit_mode = "Angle-Length", end_mode = "Perpendicular",
edge_num = 4, gamma = 90, length = 0'-3.0000",
dist_x = 0'-0.0000", dist_y = 0'-0.0000", gs_shadow = 1,
gs_cont_pen = 4, gs_fill_type = ind(fill,"Empty Fill"),
gs_fill_pen = 2, gs_back_pen = -1, gs_prim_mat = ind(material,"05 | Copper New"),
gs_list_cost = 0, gs_list_manufacturer = "", gs_list_note = "",
gs_list_location = "", gs_list_accessories = "", FM_Type = "Others",
FM_InventoryNumber = "", FM_SerialNumber = "", FM_ProductionYear = "",
FM_ObjectWeight = 0, FM_ObjectWeightUnit = "kg",
gs_list_custom1 = "", gs_list_custom2 = "", gs_list_custom3 = "",
gs_list_custom4 = "", gs_list_custom5 = ""
del 2
body -1
!!Column-01
pen 2
GLOB_ID = "Column-01"
GLOB_INTGUID = "A7A89F5F-607A-D94E-82C3-CBD044781E9E"
body -1
sprism_{2} col_mat, col_mat, col_mat,
5, 0'-0.0000", 0'-0.0000", 3'-3.3701", 0'-0.0000", 3'-1.5000", 0,
0'-0.0000", 0'-0.0000", 3'-3.3701", 0'-0.0000", 0'-0.0000", 0,
-0'-2.7500", -0'-2.7500", 63, ind(material,"09 | Paint-02 Whitewash"),
0'-2.7500", -0'-2.7500", 63, ind(material,"09 | Paint-02 Whitewash"),
0'-2.7500", 0'-2.7500", 63, ind(material,"09 | Paint-02 Whitewash"),
-0'-2.7500", 0'-2.7500", 63, ind(material,"09 | Paint-02 Whitewash"),
-0'-2.7500", -0'-2.7500", 63, ind(material,"09 | Paint-02 Whitewash")
body -1
body -1
!!Slab-01
GLOB_ID = "Slab-01"
GLOB_INTGUID = "92445F34-0C9F-1A4B-A761-DF3DA9FB1D17"
body -1
addz 3'-1.5000"
cprism_ "09 | Paint-02 Whitewash", "09 | Paint-02 Whitewash", "09 | Paint-02 Whitewash",
5, 0'-1.5000",
-0'-3.2500", 0'-3.2500", 15,
0'-3.2500", 0'-3.2500", 15,
0'-3.2500", -0'-3.2500", 15,
-0'-3.2500", -0'-3.2500", 15,
-0'-3.2500", 0'-3.2500", -1
base
vert 0'-0.0000", 0'-0.0000", -3'-1.5000"
vert 0'-6.5000", 0'-0.0000", -3'-1.5000"
vert 0'-0.0000", 0'-6.5000", -3'-1.5000"
vert 0'-0.0000", 0'-0.0000", -3'-0.0000"
coor 8468, -1, -2, -3, -4
del 1
body -1
7 REPLIES 7
Erika Epstein
Booster
You need to add these parameters on the Parameter tab of your newel post. They are parameters from the pyramid element you used. The values you enter for the length will be dummies as the pyramid will stay the dimensions as set when you dragged the element into the 3D Script window.
Erika
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System

"Implementing Successful Building Information Modeling"
Anonymous
Not applicable
Thanks, Erika.

That makes my object work and I appreciate that, but I still don't understand what's going on here. I'd rather not have to bug everyone here with a post of my script every time something like this doesn't work.

How did you know what parameters needed to be added?
Erika Epstein
Booster
Wrathchild wrote:
I'd rather not have to bug everyone here with a post of my script every time something like this doesn't work.
Your welcome.
How do you think we all learned? Posting questions. That's what the forum is for.
I clicked on the Check Script button in the 3D window and noted down the missing parameter, and added a new parameter with that name. Then clicked again on the Check Script button, noted the missing parameter and added... until there were no more missing parameter error messages.
Erika
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System

"Implementing Successful Building Information Modeling"
Anonymous
Not applicable
Wow! Seems so simple when you spell it out. When I got errors saying 'missing parameter" I thought the errors were missing from the script. I didn't even think to add parameters to the, well, uh, parameters......lol.

Thanks a bunch Erika.
Anonymous
Not applicable
Interesting post. It shows a lack with autoscripted objects.

The macro called object "Pyramid" has graphical hotspots. That's the problem.

In such situation, for scripted objects, we learn by trial an error, as Erika said,
that we have to declare all the parameters relative to graphical hotspots in the main object.

For autoscripted objects, AC should create automatically these (hotspot relative) parameters in the main object, to avoid a failure.
Anonymous
Not applicable
Olivier wrote:
Interesting post. It shows a lack with autoscripted objects.

The macro called object "Pyramid" has graphical hotspots. That's the problem.

In such situation, for scripted objects, we learn by trial an error, as Erika said,
that we have to declare all the parameters relative to graphical hotspots in the main object.

For autoscripted objects, AC should create automatically these (hotspot relative) parameters in the main object, to avoid a failure.
Sounds like a good tutorial...........and shouldn't that be a topic here?

Put that on my wish list.
Anonymous
Not applicable
One problem with relying on someone else's objects and macros (even Graphisoft's) is that they may be changed at some point in the future. If this happens, you run the risk of further errors being generated.

You know, you would probably find it easier to write the script yourself using GDL elements rather than objects. And the script would be a lot easier to debug.