Dominika Bobály

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 75 total)
  • Author
    Posts
  • in reply to: Finding LIBRARYGLOBALS names #2636
    Dominika Bobály
    Keymaster

    They are categorized in the GDL Manual (which you have probably found already), so if you have a good guess, you might be able to find the right one.
    You can try to use the “Dump library parts of selected elem…” command from the Library developer menu (palce a random object, select it, then use the command), the result report (check the report window) lists all plan global names and values along with the object’s parameters.
    About accessing the Library Developer menu, see here.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Migrating to AC20 #2626
    Dominika Bobály
    Keymaster

    Laura,
    the problem is not that you used the old form of GLOB_SCALE in the paramscript, but that you used it at all. It’s still there, causing the “rubber band” to fall off in any other scale but 1:100 (that is the dummy default of this global in paramscript: it’s not containing an up-to-date value any more in AC20).
    If I’m correct, you use the GLOB_SCALE to keep your object in paper size. You can do that without this global, see my post a bit further up (about editable hotspots for paper size). Sorry if I did not get your intention, but hopefully that will solve your problems with the object.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Migrating to AC20 #2616
    Dominika Bobály
    Keymaster

    To have paper scale editable hotspots (which show mm in the tracker), you have to do the following:

    • add a real type parameter to use as meter in GDL script (“paperSize_M”)
    • add a real type parameter to use as millimeter for paper scale display (“paperSize_Mm”)
    • connect the two parameters in parameter script (with GLOB_MODPAR_NAME, using a *1000 multiplier or divider)
    • write an editable hotspot trio for the meter-substitute parameter in 2D, use the 1024 flag
    • the hotspot’s displayparam should be the millimeter-representative
    • for the actual drawing, use a variable in 2D, which you calculate from the parameter “paperSize_Mm” using GLOB_SCALE (paperToModel in our scripts)

    If you use the 1024 flag, the edited hotspot will be calculated by ARCHICAD to meters in paper space, according to GLOB_SCALE automatically, so you do not need to use GLOB_SCALE in parameter script to connect the model-size and paper-size parameter.
    Check out the Multileader Label object in the official library, it has this functionality implemented.
    The flag 1024 can be checked out here.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Migrating to AC20 #2614
    Dominika Bobály
    Keymaster

    A_ is used in the parameter script, which is GLOB_SCALE in old form. That may cause problems: its default value is set to 100 in paramscript, so your object works fine in 1:100, but starts to behave strangely in any other scale.
    The warning is not “visible”, because you use the global in a valid condition, and this specific warning only works while interpreting the script (this was necessary because master script can use restricted globals in script-type dependent conditional expressions).

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Migrating to AC20 #2610
    Dominika Bobály
    Keymaster

    Laura,
    please upload the file in .zip (.gsm is not allowed in this forum engine), or send it to the email address of GDLCenter. Thanks.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Newparameter #2477
    Dominika Bobály
    Keymaster

    There are multiple problems with the script above:
    – the 2 arrays in the master should run to the 4th index (you have double 3)
    – values{2} only works for integer types (“A” is length type by default)
    – loose the array brackets in the values{2} command definition
    – the ASSOCLP_PARVALUE_WITH_DESCRIPTION request returns pairs of value-description of the requested parameter, so info1 should be an array type of variable (otherwise it will only contain the first returned value only, without description string)
    You can do this:

    dim info1[]
    
    n = REQUEST("ASSOCLP_PARVALUE_WITH_DESCRIPTION", "parammparamm", DUMMY_name_index, DUMMY_type, DUMMY_flags, d, dd, info1)
    
    if vardim1(info1) > 0 then
    	for ii = 1 to vardim1(info1) step 2
    		text2 0, 0, info1[ii]
    		text2 1, 0, info1[ii+1]
    	next ii
    endif

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: parvalue_​description #2357
    Dominika Bobály
    Keymaster

    This function can be used to display the description text assigned to the actual value of any integer parameter with VALUES{2} list.
    It works on the interface, or for 2D/3D texts.
    For example, you have an object with the following parameter and values in paramscript:

    values{2} "iExampleParam" 1, 'Description Text 1',
    			2, 'Description Text 2'

    If you would like to display the description text of the selected value on the UI script, do this:

    stDescription = PARVALUE_DESCRIPTION ("iExampleParam")
    ui_outfield stDescription, 10, 10, 180, 15

    On the attached picture, the chosen value is 2, so the description text belongs to value 2.
    The command works in 2D and 3D as well.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Interface image clarity #2354
    Dominika Bobály
    Keymaster

    Joachim is right about picture size: the displayed size should match the original width and height (this case, since it’s a 2 picture matrix, half size should be appropriate) most of the time. The original picture looks jagged if I just open it in Finder Preview on Mac. It’s more of a picture editing question than GDL, I think. We got the Hoods right in the Library, but if you take a closer look to the door handle popup images, you can see some jagged lines there as well (they are not prefect at all). You may try to save a double sized original picture with better resolution (so it has smaller visible pixelation at the slanted edges), and scale it to half size in the command’s image_x, image_y parameters. That may help a bit. Using .png format is recommended as well instead of .tif.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Change marker change :) #2306
    Dominika Bobály
    Keymaster

    The custom data added to Change Scheme is not available through autotexts (there is no automatic autotext equivalent for all change scheme data, only name and ID), that’s why you can not make it work, unfortunately.

    The reason Revision History objects can use custom change data is the following:
    every new entry you create in Change Scheme is added to the global variable GLOB_CHANGE_SCHEME as a new header info, and the Revision History objects use that global for display selection settings (so no autotext are used there).
    This global is available in every context, but the “pair” global containing the actual values assigned to each change are stored in LAYOUT_CHANGE_HISTORY, and that is only filled in layout context (since it only makes sense in layout). Revision History objects can display every change related to the current layout.

    Technically all the same data is available for a change marker (or any object) as well, but since currently there is no “automatic” way to narrow the data to the marker’s assigned change only, displaying just the filtered info (Change Order of the connected change in your example) is not possible.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Determining which tool and setting are selected #2285
    Dominika Bobály
    Keymaster

    It’s not passed down to GDL in any form, so there is no way to use it as a condition in your script.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Attempting to add Transformations to IF/THEN statement #2284
    Dominika Bobály
    Keymaster

    Joachim is quite right.
    Another nice way to keep track of your transformation stack is to assign a variable to count every trafo you make:

    _nTrans = 0
    IF HoodPosition = “Open” THEN
      ROTx 294
      ADDz 0′-10 3/4″
      ADDy -3′-6 5/32″ 
      _nTrans = _nTrans + 3
    ELSE
      ! whatever, just keep track of transformations here as well, if you use any
    ENDIF
    !script here
    DEL _nTrans
    

    This way you don’t have to use the condition again to enable the DEL command.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: GLOB_​ changes #2158
    Dominika Bobály
    Keymaster

    For 2D and 3D “preview” in the settings dialog try the GLOB_PREVIEW_MODE global, it has a special value for that (1). This is still not helping in conditional parameter locking, though. Not sure I understand why need to lock certain parameters “outside” the settings dialog, so could you please give some more details?

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Wall Points #2157
    Dominika Bobály
    Keymaster

    The WALL_ID global is only filled by ARCHICAD in DW object, and “classic” labels, so building a function in accessory elements connected to that might be problematic.
    The current fix named optional parameters in the accessory elements for walls contain geometric information about the selected wall’s shape and end cut angles (ac_angles, ac_top_poly, ac_bottom poly etc.,), so it’s possible to calculate special points of the wall using trigonometry, most of the cases. You can display this info in 2D, but the ID-relation is still not solved.
    To tell the truth, the Accessories may be unreliable in lots of geometric cases, and haven’t been updated for many versions now.
    If you have not found this wall global list yet, please, check, maybe all needed geometric data is available in normal labeling function as well.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: GLOB_​ changes #2150
    Dominika Bobály
    Keymaster

    The restrictions for using these globals only apply to the parameter script, and master script run as parameter script. One of the main reasons is to prevent stored parameter inconsistencies of a placed object in different view settings. The aforementioned globals will work in every other script. Sorry for repeating again, if you meant the same, but I wanted to make sure the parameter/master script only restriction is registered.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

    in reply to: Wall Points #2149
    Dominika Bobály
    Keymaster

    To be able to calculate those points in every case and connection angle, you would have to know the thickness and connection angle of the connecting walls which information is not accessible through labels.

    Dominika Bobály
    Product Manager
    GRAPHISOFT SE

Viewing 15 posts - 46 through 60 (of 75 total)