BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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

Library Part Does Not maintain values

Anonymous
Not applicable
I created a supre part for 2x framing. There are approximately 18 different values for a parameter I set up. The part respondds when the values are chosen but when ever I open a plan again the parts are not the size I left them as. I have tried placing the script commands in the Paramter script and the Master Script I have used the "LET" command and "PARAMETERS" together and separately it still doesn't remember the info. Any ideas would be greatly appreciated. Thanks. The scipt is below:

IF joist_size='2x4' THEN
parameters b=1.5",zzyzx=3.5",F=1,gs_back_pen=91,gs_cont_pen=3
IF a>16'-0" THEN parameters a=16'-0"
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='2x6' THEN
parameters b=1.5",zzyzx=5.5",F=1,gs_back_pen=91,gs_cont_pen=3
IF a>16'-0" THEN parameters a=16'-0"
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='2x8' THEN
parameters b=1.5",zzyzx=7.25",F=1,gs_back_pen=91,gs_cont_pen=3
IF a>16'-0" THEN parameters a=16'-0"
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='PT 2x4' THEN
parameters b=1.5",zzyzx=3.5",F=4,gs_back_pen=0,gs_cont_pen=3
IF a>16'-0" THEN parameters a=16'-0"
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='PT 2x6' THEN
parameters b=1.5",zzyzx=5.5",F=4,gs_back_pen=0,gs_cont_pen=3
IF a>16'-0" THEN parameters a=16'-0"
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='PT 2x8' THEN
parameters b=1.5",zzyzx=7.25",gs_back_pen=0,gs_cont_pen=3
IF a>16'-0" THEN parameters a=16'-0"
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='2x10' THEN
parameters b=1.5",zzyzx=9.25",F=1,gs_back_pen=91,gs_cont_pen=3
IF a>16'-0" THEN parameters a=16'-0"
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='2x12' THEN
parameters b=1.5",zzyzx=11.25",F=1,gs_back_pen=91,gs_cont_pen=3
IF a>16'-0" THEN parameters a=16'-0"
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='2x4 Blocking' THEN
parameters b=3.5",zzyzx=1.5",F=4,gs_back_pen=0,gs_cont_pen=1
IF b>3.5" THEN parameters b=3.5"
ENDIF
IF joist_size='2x6 Blocking' THEN
parameters b=5.5",zzyzx=1.5",F=4,gs_back_pen=0,gs_cont_pen=1
IF b>5.5" THEN parameters b=5.5"
ENDIF
IF joist_size='2x8 Blocking' THEN
parameters b=1.5",zzyzx=7.25",F=1,gs_back_pen=91,gs_cont_pen=1
IF a>16'-0" THEN parameters a=16'-0"
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='2x10 Blocking' THEN
parameters b=1.5",zzyzx=9.25",F=1,gs_back_pen=91,gs_cont_pen=1
IF a>16'-0" THEN parameters a=16'-0"
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='2x10 Rim Joist' THEN
parameters b=1.5",zzyzx=9.25",F=1,gs_back_pen=91,gs_cont_pen=1
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='2x10 Girder' THEN
parameters b=1.5",zzyzx=9.25",F=1,gs_back_pen=91,gs_cont_pen=1
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='PT 2x6 Sill Plate' THEN
parameters b=5.5",zzyzx=1.5",F=1,gs_back_pen=0,gs_cont_pen=9
IF b>5.5" THEN parameters b=5.5"
ENDIF
IF joist_size='PT 2x8 Rim Joist' THEN
parameters b=1.5",zzyzx=7.25",F=4,gs_back_pen=0,gs_cont_pen=3
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='PT 2x8 Nailer' THEN
parameters b=1.5",zzyzx=7.25",F=4,gs_back_pen=0,gs_cont_pen=3
IF b>1.5" THEN parameters b=1.5"
ENDIF
IF joist_size='2x8 Plate' THEN
parameters b=7.25",zzyzx=1.5",F=4,gs_back_pen=0,gs_cont_pen=3
IF b>7.25" THEN parameters b=7.25"
ENDIF
7 REPLIES 7
TomWaltz
Participant
Barry wrote:
I created a supre part for 2x framing. There are approximately 18 different values for a parameter I set up. The part respondds when the values are chosen but when ever I open a plan again the parts are not the size I left them as. I have tried placing the script commands in the Paramter script and the Master Script I have used the "LET" command and "PARAMETERS" together and separately it still doesn't remember the info. Any ideas would be greatly appreciated. Thanks. The scipt is below:
Which parameters are changing? And what are their values set to both before and after the change?
Tom Waltz
Anonymous
Not applicable
Just the sizes width and height. Thanks.

Barry Halloran
Anonymous
Not applicable
Barry

I don't know whether this would help, but I often see in scripts from third parties, all parameters set to equal themselves i.e. PARAMETERS b=b;zzyzx=zzyzx, and so on... as the first statement in the PARAMETERS Script. I am not sure why script authors use this, but I suppose it must serve some useful purpose and may assist you.

In the Parameter script you can ensure that Parameters only change when a relevant Parameter changes by including a GLOB_MODPAR_NAME step.

Thus for you: IF GLOB_MODPAR_NAME='joist_size' THEN ... ENDIF
If the user changes the 'joist_size' parameter then the steps between IF and ENDIF statements will be evaluated. If that is not the parameter changed they would be unaffected.

I have found on occasion that the GLOB_MODPAR_NAME script step can 'stick' and appear not to respond to changes in the relevant Parameter, but have found that this problem can be overcome by adding a parameter called, say, modpar. At the start of the Parameters script add a statement: PARAMETERS modpar=GLOB_MODPAR_NAME (this will also work in the Master script without the PARAMETERS command)

This allows you to use the value of modpar in any script and saves typing GLOB_MODPAR_NAME each time you need the value of the last-modified parameter.

PS I think you may be able to accelerate your script by grouping some of the steps by interrogation of the 'string' value of your parameter joist_size and/or by declaring a VALUES statement to limit the parameters (e.g. a and b) The values of a and b can be limited as in:

IF STRSUB(joist_size,1,1)='2' OR STRSUB(joist_size,1,2)='PT' THEN
VALUES 'a' RANGE(val1,16'-0"]
VALUES 'b' RANGE(val2,1.5"]
PARAMETERS gs_cont_pen=1
ENDIF
where val1 and val2 are numeric lower limits of the range for the parameters. (Note the use of differing bracket styles to control the Range)

This avoids repeating the evaluation of these parameters and gives the user guidance as to what the acceptable limits are!! I am not saying that the script snippet above works for all of your preferred settings, but it might give you an idea.

Mike
Anonymous
Not applicable
Mike,

Thanks for the info. I'll give it a shot.

Barry
Anonymous
Not applicable
I think a follow up is needed to explain this a little bit more. The chosen value stays in the part but the part does not size properly. (i.e. - if a 2x10 is chosen the sizes are correct but the part doesn't show the proper sizes if measured) I have opened plans with 2x10's for floor framing and they are showing as 6" wide and 8" tall, even though the part shows the correct sizes for B and zzyzx. If I change the parameter size to another size then back the part corrects the sizes properly. Thanks.

Barry
Anonymous
Not applicable
Barry,

A safety mesure you can try, is to write your statments twice.

!!! --- Master Script ---
if something > 1.00 then
aa = 1 : bb = 2 ! and so on
else
aa= 3 : bb = 4
endif

!!! --- Parameters Script ---
parameters aa = aa, bb =bb ! and so on

Not sure if this is really your problem, but may be this can help.
Anonymous
Not applicable
Olivier,

I'll give it a try. Thanks.

Barry
Learn and get certified!