The Global Archicad Community

Stay informed. Get help. Share your knowledge.

GDL language and objects, API, Add-ons, Script…

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, Gordana Radonic, nbalogh, mnguyen, gkmethy

What is your opinion about this Wish?

Essential
4
100%
Important
No votes
0%
Average
No votes
0%
Not Important
No votes
0%
Not Needed
No votes
0%
User avatar
By vfrontiers
#321036
I'd like to be able to pass the DOOR LEAF MATERIALS to a CUSTOM DOOR PANEL I create...

Even if I revise the script and parameters of the leaf to gs_leaf_mat, it does not get passed from the host door...

In addition, if I choose CUSTOM PANEL, the leaf surface parameters are HIDDEN...

I just find two good reasons for this.....
1. I use the same door with different materials in the same file...
2. When trying to use the same panel from project to project, it'[censored] & miss whether the material ID's match..
User avatar
By vdentello
#322115
Whenever you generate a custom leaf from slabs, you'd probably be looking at a couple cprism_{4} scripts inside the custom object´s 3D script.

They'll have a "dumb" building material assigned to them.

By opening it's GDL 3D script, you cant tweak the c_prism{4} to something like this:
Code: Select all
cprism_{4} gs_leaf_mat,  gs_leaf_mat,  gs_leaf_mat, 7,
...

In order for this to work, you have to assign some of the Archicad Library's native surface parameter like gs_leaf_mat or gs_leaf_matin.

This is quite easy even with very little GDL skill.
User avatar
By Lingwisyer
#322170
vdentello wrote:In order for this to work, you have to assign some of the Archicad Library's native surface parameter like gs_leaf_mat or gs_leaf_matin.

I have not been able to get this to work in the past? Can you share an example object of where you have gotten this to work?

As explained in this thread, it is due to the Door Panel Collection call not passing on any parameters.



Ling.
User avatar
By vdentello
#322198
Forgot that we must also "comment" or remove the "Set Building Material" and substitute all "bms" with something usual.

Image

Image
User avatar
By Lingwisyer
#322222
Code: Select all
IF not(WIDO_REVEAL_SIDE) then

	!*** default placement

	topmat=gs_leaf_matin
	botmat=gs_leaf_mat
	sidemat=gs_leaf_matin
	sidematedge=gs_leaf_matin
else

	!*** flip

	topmat=gs_leaf_mat
	botmat=gs_leaf_matin
	sidemat=gs_leaf_mat
	sidematedge=gs_leaf_matin
endIF


sprism_{2} topmat, botmat, sidemat,
	5,
	0,  0, 	1,  0,  framethick, 0,
	0,  0, 	1,  0,  0,  		0,
	-a/2,						R4,		H2, 	sidematedge,
	-a/2 + gs_fw_side_right, 	R3,		15, 	sidemat,
	-a/2 + gs_fw_side_right,	b - R1,	H1, 	sidemat,
	-a/2,						b - R2,	15, 	sidematedge,
	-a/2,						R4,		-1, 	sidematedge

Does it only work with cprism?



Ling.
User avatar
By vdentello
#322262
It should work with any command, as long as the default materials are correctly set.