Péter Baksa

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 158 total)
  • Author
    Posts
  • in reply to: Can I refresh RND() ? #18392

    Péter Baksa
    Participant

    RND returns the same sequence of random numbers in each run. The sequence is different for each placed object. This makes it possible to create randomized objects (eg. trees) that look the same on different 3d views (different sections, animated fly-through rendering).

    It is possible to get the time using REQUEST(“DateTime”,…).
    You can convert the returned string to a number with SPLIT.
    Use that in a loop to get different number of random numbers in each run.

    n = REQUEST ("DateTime", "%S", datetimestring)
    split(datetimestring, "%n", rndseed)
    for i = 1 to rndseed + 1
    	random = int(rnd(100))
    next i
    text2 0,0, str(random, 1, 0)

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: zone stamp: default property settings #18358

    Péter Baksa
    Participant

    As long as the properties aren’t deleted by the user in Options / Property Manager.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: zone stamp: default property settings #18354

    Péter Baksa
    Participant

    The property GUIDs are project-dependent, a default value of the library part wouldn’t work in another plan.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: zone stamp: default property settings #18353

    Péter Baksa
    Participant

    I couldn’t get the second one to work either.

    The parameter list in the GDL editor is not connected to anything in the UI script, it is only affected by the parameter script.
    You can’t get the property GUIDs in the parameter script, that’s why the UI_CUSTOM_POPUP_LISTITEM and UI_CUSTOM_POPUP_INFIELD were created.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: File missing error #18350

    Péter Baksa
    Participant

    You could try to search for the file with the FileMan add-on (if it’s on disk, not in the loaded libraries).

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE


  • Péter Baksa
    Participant

    Hi Ricardo,

    rotation is always relative to the origin, so first move the origin to the anchor point, rotate, then draw the text at 0,0.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE


  • Péter Baksa
    Participant

    Please submit this description with the bug report if you haven’t already.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: Wallniche in curved Walls #18321

    Péter Baksa
    Participant

    Hi Joachim,

    Yes, it is possible. ROTX -90, then cut with a crescent-shaped polygon.
    For example, this cuts a niche when placed properly (you’d have to handle left and right curved walls, and flipped/mirrored state too):

    hotspot 0,0,0
    rotx -90
    
    _wallRadius		= sqr(WIDO_ORIG_DIST **2 + A **2 / 4) 
    
    dict _arcCenter
    _arcCenter.x		= 0
    _arcCenter.y		= -WIDO_ORIG_DIST
    
    ! surface of wall
    dict _faceCircle
    _faceCircle.center	= _arcCenter
    _faceCircle.radius	= _wallRadius - WIDO_SILL
    
    ! chord at window plane
    dict _chord
    _chord.points[1].x = -A/2
    _chord.points[1].y = 0.0
    _chord.points[2].x = A/2
    _chord.points[2].y = 0.0
    
    ! project points of chord to _faceCircle, from _arcCenter centrally
    dict _faceArc
    call "BasicGeometry" parameters iFunction	= 18,		! BasicGeometry.PROJECT_POINTS_CIRCLE_2D
    				points2D	= _chord,
    				pointFrom	= _arcCenter,
    				circleA		= _faceCircle,
    			returned_parameters	_faceArc! should have exactly 1 intersection
    
    hotspot _arcCenter.x,		_arcCenter.y,		0
    hotspot _faceArc.points[1].x,	_faceArc.points[1].y,	0
    hotspot _chord.points[1].x,	_chord.points[1].y,	0
    hotspot _faceArc.points[2].x,	_faceArc.points[2].y,	0
    hotspot _chord.points[2].x,	_chord.points[2].y,	0
    
    put _arcCenter.x,		_arcCenter.y + _wallRadius,		1+4+8+16+64
    put _arcCenter.x,		_arcCenter.y,				931
    put _chord.points[1].x,		_chord.points[1].y,			3031
    put _faceArc.points[1].x,	_faceArc.points[1].y,			31
    put _arcCenter.x,		_arcCenter.y + _faceCircle.radius,	0
    
    resol WALL_RESOL
    
    wallniche	NSP / 3, 1, 2,							! n, method, status
    		0, 0, 1,							! rx, ry, rz
    		B,								! d
    		use(NSP)							! x, y, s
    mulx -1
    wallniche	NSP / 3, 1, 2,							! n, method, status
    		0, 0, 1,							! rx, ry, rz
    		B,								! d
    		get(NSP)							! x, y, s
    del 1

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: Compare parameter value to an Array in GDL #18277

    Péter Baksa
    Participant

    Write a WHILE loop that compares the value to each value in the array, and terminates when found.
    If you need to use it in many places with many arrays, write it as a macro.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: ArchiCAD 23 & GLOB_​FRAME_​NR #18249

    Péter Baksa
    Participant

    No, this is an unknown bug, I will report it.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: Show overlapping prisms / blocks as solid #18222

    Péter Baksa
    Participant

    Hi,

    the line elimination in mask of CPRISM_{3} only works when the edges are in the same place, it doesn’t calculate intersections.

    Other ways to do it:
    – model CPRISMs that only touch eachother
    – write a loop that PUTs the hole coordinates in a large CPRISM
    – use ADDGROUP, it removes lines at intersections

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: Spam posts #18212

    Péter Baksa
    Participant

    We are looking into resetting the flags.
    An alternative solution to get notified about new posts is using the RSS feed http://gdl.graphisoft.com/forums/feed

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: Cube Frame parametric #18211

    Péter Baksa
    Participant

    Hi,

    the easiest way is to use MODEL WIRE.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: Hide Script #18206

    Péter Baksa
    Participant

    Programmer’s text editors show it usually somewhere in the status bar (Notepad++, VS Code).
    To be very sure, use a hex editor, the first three bytes should be EF BB BF.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • in reply to: Hide Script #18201

    Péter Baksa
    Participant

    Hi Ling,

    this should work. Make sure the XML file encoding is UTF-8 with BOM.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

Viewing 15 posts - 1 through 15 (of 158 total)