Péter Baksa

Forum Replies Created

Viewing 15 posts - 91 through 105 (of 224 total)
  • Author
    Posts
  • in reply to: Error changing value in schedule #18059
    Péter Baksa
    Keymaster

    Why are you using a two-dimensional array with the first dimension size only 1? Is that only for the example?

    Possible workaround: the parameters are dynamic arrays too. You can append items to it beyond its current size.

    si = vardim2(a2)
    if n > si then
    	for i = si + 1 to n
    		a2[1][i] = -1
    	next i
    	parameters a2 = a2
    endif

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Error changing value in schedule #18050
    Péter Baksa
    Keymaster

    Hi Kristian,

    I only get this error when the array parameter is one-dimensional in the libpart editor. Change it two two-dimensional by inserting a column.

    One and two-dimensional dynamic arrays are not interchangeable.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    Péter Baksa
    Keymaster

    Thank you, Using BasicGeometricCalc macro is updated with clickable image links.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    Péter Baksa
    Keymaster

    Hi John,

    The vector is not the endpoint of the vector, just the vector itself. So in your case if (0.5, 0) and (0.5, 1) are two points on the line, the vector is (0, 1).

    BasicGeometricCalc can return the unit vector between two points:

    call "BasicGeometricCalc" parameters iFunction = 1,
                                          Point1X = toX,   Point1Y = toY,   Point1Z = toZ,
                                          Point2X = fromX, Point2Y = fromY, Point2Z = fromZ,
                      returned_parameters Vx, Vy, Vz, distance

    Vx, Vy, Vz will be the unit vector, and distance will be the distance between Point1 and Point2.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Multipage Tiff files handling #4847
    Péter Baksa
    Keymaster

    Hi,

    If you create the images in svg format, put them in a folder, LP_XMLConverter convertlibrary -excludesvg <folder> <tifffolder> converts them.
    There is one limitation: it converts text with a default font, and gives a warning. Explode text in the svg editor.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    Péter Baksa
    Keymaster

    Hi,

    each input “direction vector” of BasicGeometricCalc has to be a unit vector (length = 1.0 meter). You get a unit vector by dividing each coordinate with the length.
    The returned vectors are unit vectors too.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Addon library object macro missing #4827
    Péter Baksa
    Keymaster

    Hi Tim,

    You can open it if you select the macro name, and press Ctrl-Shift-o. It is loaded with the add-on, not listed in the library manager.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: UI not remembering current page #4825
    Péter Baksa
    Keymaster

    Did you add gs_ui_current_page as integer parameter?

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Variable Mismatch #4821
    Péter Baksa
    Keymaster

    The 2d script doesn’t know about the variables in the UI script. You have to write the same request in the 2D script too, or move it to the master script (just don’t use the variables in the parameter script, as the request will be unsuccessful from parameter script).
    UI_INFIELD can’t show variables. Is ProWidth and ProHeight a parameter? No matter what you assign to it in the scripts, UI_INFIELD will show the stored parameter values. You would need a PARAMETERS command to change them, but you can’t do it, as this request doesn’t work in parameter script.
    You can show variables and current value of parameters with UI_OUTFIELD.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Variable Mismatch #4816
    Péter Baksa
    Keymaster

    Then this should work. How do you check the return values?

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Variable Mismatch #4814
    Péter Baksa
    Keymaster

    Is that a parametric profile, or are you selecting different profile for myProfileIdx?
    Parametric profiles don’t work with GDL, they always return their default geometry.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: SUBGROUP and surfaces #4812
    Péter Baksa
    Keymaster

    You need to write multiple subgroups for each target material.

    When the status of SUBGROUP{3} is 0, the new cut surfaces will use the last MATERIAL, not the target.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: PROFILE REQUEST PARAMETER SCRIPT #4808
    Péter Baksa
    Keymaster

    I attached a screenshot of the “Profiled Rail” UI. The popup is an infield of a profile type parameter, in the red box you can see the size of the profile. This is done automatically by Archicad.
    In the blue box there are two outfields based on variables returned by the request. The request itself can be in the UI or the master script.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Variable Mismatch #4799
    Péter Baksa
    Keymaster

    Don’t think about the master script on its own, in fact it is prepended to the actual script that is run. So it doesn’t help with requests that can’t be used in a parameter script.
    You can’t control the execution order of the scripts, generally parameter script is run before the 2D/3D.
    Something like this:

    master script -> param script: sets parameters
    all variables cleared
    master script again with the new parameters -> param script: sets other parameters
    all variables cleared
    master script again with the new parameters -> 2D script
    all variables cleared
    master script again with the same new parameters -> 3D script

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

    in reply to: Variable Mismatch #4790
    Péter Baksa
    Keymaster

    If you have VALUES or PARAMETERS based on these in the parameter script, it is possible that the param script is run more than once, and the code you wrote will be executed more than once with different parameter values. Your condition B is based on A, but in the next run A is based on the last run of B.

    You might need to use GLOB_MODPAR_NAME in the parameter script, based on which parameter the user changed, only one of the limiting conditions has to be applied.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

Viewing 15 posts - 91 through 105 (of 224 total)