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

GDL: Multiple Complex Profiles

Lingwisyer
Guru
Hi all,

Anyone know how to get multiple complex profiles to work within a single object? So far when I try to add a second profile, changing the relevant request definitions, the first profile breaks...



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
14 REPLIES 14
Anonymous
Not applicable
Hello everyone! I wrote a simple script by archicad 22

This is the main code

dim pfsj2[]    
pen 1
	
for i = 1 to MULTIPLECO_A
	jdsl=0 		    !Calculate the number of points
	!----------------------------get profile number and geometry
	n = request{2}("Profile_components", myProfileIdx, jmsl, jglx)   !profile number
	n = REQUEST ("Profile_default_geometry", myProfileIdx, pfsj2)    !profile geometry
	if jmsl>0 then 
		for i2 = 1 to jmsl
			!------------------------------------Collection point
	        n = REQUEST{3} ("Profile_component_info", myProfileIdx, i2, "gs_profile_surface", _surface) !MAT
			for i3 = 1 to pfsj2[i2]
				jdsl=jdsl+1 								!Calculate the number of points
				x=pfsj2[jmsl+5*jdsl-5+1]
				y=pfsj2[jmsl+5*jdsl-5+2]
	           if  pfsj2[jmsl+5*jdsl]=900  then sn =  900  
	           if  pfsj2[jmsl+5*jdsl]=4000 then sn =  4015
	           if  pfsj2[jmsl+5*jdsl]=-1   then sn =  -1
	           if  pfsj2[jmsl+5*jdsl]=0    then sn =  15  
				put x,y,sn,_surface
			next i3
			!------------------------------------MODEL
	        SPRISM_{4}  _surface,_surface,_surface,1+2+4+8, 
				        nsp/4,
				        0, 0,    0, 1,1,0,    
				        0, 0,    0, 1,0,0,
				        get(nsp)
		next i2
	endif
next i
Lingwisyer
Guru
The issue with using an array in the parameters to define the profile is that the selection can only be done by index rather than by drop down and since you cannot view the index numbers anywhere other than the Attribute Manager, this is not a viable option. If we were able to use requests in the Parameter Script this could have worked as then you could have a second and third dummie parameter with one being a standard profile selection, and the other displaying the index number of the selected profile, but alas, this is not the case...

If you can modify parameter arrays via the UI Script this might be possible, as requests work there. The extra work here may as well be used to duplicate standard profile parameters with additional HIDEPARAMETER statements.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
Anonymous
Not applicable
Lingwisyer wrote:
The issue with using an array in the parameters to define the profile is that the selection can only be done by index rather than by drop down and since you cannot view the index numbers anywhere other than the Attribute Manager, this is not a viable option. If we were able to use requests in the Parameter Script this could have worked as then you could have a second and third dummie parameter with one being a standard profile selection, and the other displaying the index number of the selected profile, but alas, this is not the case...

If you can modify parameter arrays via the UI Script this might be possible, as requests work there. The extra work here may as well be used to duplicate standard profile parameters with additional HIDEPARAMETER statements.



Ling.
Lingwisyer
Guru
Well, that was easy enough. I have not played around with the UI Script much so I was not sure how it would work.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
Lingwisyer
Guru
So, the block that we usually include in the Master Script is almost entirely regarding structural function? With the rawprofilegeometry being the break down of the profile into it's structural components?

If that is the case, for many uses, the only bit that might be useful is the bounding box request. A 26 line reduction per profile.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660