Péter Baksa

Forum Replies Created

Viewing 14 posts - 211 through 224 (of 224 total)
  • Author
    Posts
  • in reply to: Double use of buffer #3562
    Péter Baksa
    Keymaster

    Hi Bruce,

    That way the path will stay in the buffer, but if you use it in a loop, next time you won’t be able to put the profile before that.
    One solution is to use arrays, and put the values you need before the tube command.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: name of material #3397
    Péter Baksa
    Keymaster

    Hi,

    The result of the REQUEST command is the number of successfully retrieved values (integer). The name of the material will be in the variable name in your example.
    This request expects a material index, unquote ”MaterialAttribute_1″.
    In define style use quotes: DEFINE STYLE “text” “arial”, 3, 5, 1

    _nResult = REQUEST (“Name_of_material”, MaterialAttribute_1, _nomcolor)

    DEFINE STYLE “text” “arial”, 3, 5, 1
    STYLE “text”
    if _nResult then
    text2 A/2,B/1.5, _nomcolor
    else
    text2 A/2,B/1.5, “undefined”
    endif

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Hiding vertical lines in holes in Prisms #3279
    Péter Baksa
    Keymaster

    Hi James,

    yes, this is a bug, we’ve discovered it just recently, there will be a solution in ArchiCAD21 to fix this.
    Use TUBE instead of PRISM until then:

    TUBE 7, 4, 1 + 2 + 16 + 32,
    
        0, 0, 0,
        A, 0, 0,
        A, B, 0,
        0, B, 0,
        0, 0, -1,
    
        hA, hA, 900,
        hA/2, 360, 4001,
    
        0, 0, -1, 0,
        0, 0,  0, 0,
        0, 0,  1, 0,
        0, 0,  2, 0

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Parmameter handover #3218
    Péter Baksa
    Keymaster

    Hi René,

    If you need to export the parameters outside ArchiCAD, use Schedules.
    You can add library part parameters to the schedule using Scheme Settings dialog / Add Fields / Library Part Parameters. In the next dialog Select Object by: Folder View (used Objects only), then select the library part you need, and add it’s parameters to the list.
    After configuring the schedule, create a view from it, and add that to a publisher set. Finally select XLS format.
    It’s a long way to set up first time, but only a click to refresh the XLS after that.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Centerpoint in simpel 2D symbol #2983
    Péter Baksa
    Keymaster

    For all GDL objects, you can select which hotspot acts as origin for scaling. You can do it in the settings dialog preview pane. Simply add a hotspot in the place that you want to use as origo.

    If you need the default behaviour of your object being to scale from the origo, you have to do the transformations in the code, after mul2 move it half the new size to downwards and left.

    Another way to do it: before Save As, move the drawings center to the project origin, it will be saved relative to that position.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Macros and hotspot2 #2959
    Péter Baksa
    Keymaster

    I recommend you to read this article:

    09. Parameter logic

    The sections Changing the value of a parameter, and Connections between parameters can be used in your case.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Macros and hotspot2 #2956
    Péter Baksa
    Keymaster

    Hi!

    I don’t know if I understand you correctly, but maybe what you need is setting the parameter value before the macro call. You can do that in the parameter script with the PARAMETERS command. I see 1200/900 setting depends on Element_type parameter of your object, use GLOB_MODPAR_NAME global variable to check whether last parameter modified was "Element_type", and if its new value is 2, set parameters B = 0.9. Then you can call your macro in the 2D script using PARAMETERS ALL, the B parameter will be 0.9.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Point inside a polygon using Polygon Operations Macro #2593
    Péter Baksa
    Keymaster

    Hi SimPey,

    The macro you are calling returns “On edge” status for points that lie on the line of the edge, even if they are outside the start-end segment. You could check in your code if that is the case.
    The official library doesn’t use this macro with the OPERATION_POINT_INSIDE_POLYGON parameter.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Projection code #2592
    Péter Baksa
    Keymaster

    Hi Jeroen,

    Yes, this is possible with some sort of hacking.
    You can pass parameters to the 3D script with PROJECT2{3}. Set up a parameter to signal that you want a special 3D model that is rotated to the same position as the top view. That way you can get equivalent shadings.
    Note those shadings won’t be the actual rgb of the surface, I don’t know of a way of achieving to display that.

    2D:
    PROJECT2{3} 3, 90, 3, 15, parameters side = 0
    PROJECT2{3} 3, 90, 3, 15, parameters side = 1
    PROJECT2{3} 3, 90, 3, 15, parameters side = 2

    3D:
    if side = 1 then rotx 90
    if side = 2 then roty -90

    MATERIAL Surfaceblock
    BLOCK 1,1,1
    ADDZ 1
    ADDX .4
    ADDY .4
    BLOCK .2,.2,.2

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    Péter Baksa
    Keymaster

    I tested this quickly (on Windows), and it seems you can’t enter Unicode into the GDL editor. As a workaround, you can enter Unicode into String type parameters, set them to hidden, and concatenate your strings using those.
    BTW the subscript characters are very hard to read in the settings dialog.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Newparameter #2418
    Péter Baksa
    Keymaster

    So I meant:
    if varia­[ i ] = 1 then

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Newparameter #2416
    Péter Baksa
    Keymaster

    offtopic
    it’s hard to enter [ i ] in this forum, just add spaces around the i.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Newparameter #2415
    Péter Baksa
    Keymaster

    Your code would work with the following corrections:

    dim varia[]
        varia[1]=a1
        varia[2]=a2
        varia[3]=a3
        varia[4]=a4
        varia[5]=a5

    Quotation marks not needed.

    if varia­[LIT][i][/LIT]=1 then
    parameters set with values{2} can be used as numbers.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Newparameter #2395
    Péter Baksa
    Keymaster

    In GDL scripts “…” is just a string even if the contents are the name of an existing parameter. In general-use languages there is usually a function like eval() to get the value behind the string, GDL can’t do this.
    In your second example the if condition translates to “a1″=’opt1′ which is false.
    You could use an array parameter and loop over it, but the values command can’t handle arrays.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

Viewing 14 posts - 211 through 224 (of 224 total)