Denny Wong

Forum Replies Created

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • in reply to: Performance issue with Custom Labels #4274

    Denny Wong
    Participant

    Many thanks Piotr, that’s a relief to know as trying to troubleshoot this is driving me nuts.

    The wait for the office upgrade continues….

    Bond Bryan Architects, Westerham, UK

  • in reply to: Performance issue with Custom Labels #4225

    Denny Wong
    Participant

    I have come to the realisation that it is when the labels associate with Walls that have this problem. If I ping the same label at a Window, it will behave just fine.

    Bond Bryan Architects, Westerham, UK

  • in reply to: Combine request results #4224

    Denny Wong
    Participant

    Hi David,

    Not sure if I got your question correctly – this sounds more to do with string concatenation rather than the REQUEST itself. & operator in GDL is a Boolean operator; + is the operator you are looking for:

    n1 = REQUEST("ID_of_main", "", IDTextA)
    n2 = REQUEST("Full_ID_of_parent", "", IDTextB)
    if n1 and n2 then
      IDText = IDTextB + IDTextA
    else
      print "Something went wrong"
    endif

    I am not sure if REQUEST will give an Integer if IDTextA turns out to be all numbers, in which case you might need to do a VARTYPE then str(“%.0”, IDTextA) before concatenating.

    I also want to point out that if you put these REQUESTS in the Master Script, they will produce a numerical “0” if GLOB_SCRIPT_TYPE is Parameter Script. If you then try to + two 0s together obviously you will get a 0. If your confusion comes from seeing 0s as your script result, may be that’s the reason.

    kind regards,

    Denny

    Bond Bryan Architects, Westerham, UK

  • in reply to: Use element ID as zone number #4223

    Denny Wong
    Participant

    Answer in your email, Shaun. Tested on AC21.

    Denny

    Bond Bryan Architects, Westerham, UK


  • Denny Wong
    Participant

    Thanks Barry, I fully understand that. However I am still quite confused over the fundamental principles of how the scripts interact when it comes to 3D Hotspot editing.

    What I am hoping to do is in simplest terms: make a hotspot a “drag button”, when triggered every time, it adds 1000mm to A. The button resets itself after each use.

    MASTER SCRIPT

    if flip_switch then
       A = A + 1
       flip_swtich = 0
    endif

    3D SCRIPT

    _unID = 1
    hotspot 	0,		0,		0,		_unID,	flip_switch,	1+128,	flip_switch: _unID=_unID+1
    hotspot 	-1,		0,		0,		_unID,	flip_switch,	3,	flip_switch: _unID=_unID+1
    hotspot 	flip_switch,	0,		0,		_unID,	flip_switch,	2,	flip_switch: _unID=_unID+1
    
    BLOCK A, B, ZZYZX

    PARAMETER SCRIPT

    
    values "flip_switch" 0,1
    
    if GLOB_MODPAR_NAME = "flip_switch" then
    	parameters flip_switch = flip_switch
    	parameters A=A
    endif
    

    However I found that the interaction between Parameter Script/3D Script/GLOB_MODPAR_NAME very weird during 3D Hotspot operations, GLOB_MODPAR_NAME is triggered continuously before the user finishes with the edit. The example above triggeres flip_switch 8 times every time you touch it, and it does not reset itself to 0 either.

    That’s why I am wondering if GLOB_FEEDBACK_MODE will be able to ensure that the editing is finished, THEN we reset the switch and change A.

    However what I found out the hard way is that even when the user finishes editing (i.e. during the last parameter script run before everything ends), GLOB_FEEDBACK_MODE is still TRUE even though at that point editing has ended.

    I probably could figure this out by some lengthy trials…

    NOTE This is AC19 I am testing on though.

    Bond Bryan Architects, Westerham, UK


  • Denny Wong
    Participant

    Ok I learnt it the hard way how weird things can become when using GLOB_FEEDBACK_MODE in master script… I found a work around it anyway but it seems like there is some sort of caching of movable hotspots?? I am very confused…

    Bond Bryan Architects, Westerham, UK

  • in reply to: Properties Controlled by MVO #3968

    Denny Wong
    Participant

    Hi James, I don’t think there is any way to back feed information into MVO objects, my guess is there never will be. What you are doing is exactly what I had done in my office, but in the end I have to do a vardump from REQUEST (“Properties_Of_Parent”) of a Label object so that I can save the list of properties into a TXT file, from which the MVO formulates the list. This obviously prevents you from having an up to date list of properties if you change them very frequently; so you would need to have a robust vardump Label object allowing you to update the TXT file without much hassle.

    I wish GDL allows us to access the IFC Scheme Set/Property Tables.

    On the other hand I believe Applecore is working on a similar object, should you be interested.

    Bond Bryan Architects, Westerham, UK

  • in reply to: Temporary Migration for a hotlinked object #3958

    Denny Wong
    Participant

    Sorry Barry just read through your reply again and basically we are saying the same thing!

    Bond Bryan Architects, Westerham, UK

  • in reply to: Temporary Migration for a hotlinked object #3957

    Denny Wong
    Participant

    Thanks Barry,

    I guess extracting the LCF is not avoidable in any case, which is a bit of a burden when it comes to forward compatibility. Our office is going to move to AC21 in the coming month – there’s no worse timing to create a duplicate library.

    In terms of replacing the door there 300+ of them but that’s not a problem at all. I can simply
    1. load the new door with a FWM referencing the old door
    2. unload the GS default library – Door 19.gsm is gone and therefore all doors get GUIDs migrated
    3. load the new library with the new door
    …then you are all set. By doing step 1 first (i.e. not just swap the library) it allows Door 19.gsm to live in the new library – potentially to be called as a Macro from the new Door. This will simplify the process when going to AC21 as Door 21.gsm will get called instead (through cached GUID within the new Door).

    Still debating about extracting LCFs though….

    Bond Bryan Architects, Westerham, UK

  • in reply to: Temporary Migration for a hotlinked object #3954

    Denny Wong
    Participant

    Hi Denny,

    It’s not a single problem, it is adding a new function to the standard library. This should be done with the proper workflow as you mentioned first, there is no other solution, teher is no migration between duplicates…

    Thanks Gergely. It is a bit disappointing if ArchiCAD just select one of the duplicate at random but it is what it is.

    I am a bit confused.
    The angle of the door swing is not set in the MVO currently as far as I know (I don’t actually use the GS library but I just had a quick look).

    Why don’t you just manually set the angle of the doors in that one plan to 45°.
    What ever angle you set them to is what they should be even when used in a hot-link.

    Barry.

    Hi Barry, our problem is we produce GA plans from one file where the doors need to be 90° while the same door when hotlinked to another PLN needs to be 45° on a Sales Brochure plan. Whatever angle I set it in the Component PLN will affect both plans.

    The GS doors swings do not use MVO as you say; this is something I need to add to the 2D script which will solve the above problem. It is not difficult at all, but in order for that to take effect I have to remove the default GS door from the loaded library of Sales Brochure PLN; otherwise AC will load the same old GS door every time. I am hoping to avoid extracting the entirety of the ArchiCAD Library LCF just to remove one gsm from one single file of a project… hence the question.

    Bond Bryan Architects, Westerham, UK

  • in reply to: Temporary Migration for a hotlinked object #3950

    Denny Wong
    Participant

    I wish to add that using Forward Migration Script is not an option unless I unload the default ArchiCAD Library; otherwise AC will always use the existing object if available.

    Bond Bryan Architects, Westerham, UK


  • Denny Wong
    Participant

    A follow up to this:

    Turns out the solution is very simple. Go to MVO, Export one of your MVO and read the XML……

    Bond Bryan Architects, Westerham, UK

  • in reply to: VARTYPE issues #3760

    Denny Wong
    Participant

    hi Joachim, sharing your pain here. In fact this is a very old problem when the GDL interpreter make assumptions of what types the varilables are PRIOR to execution and over-zealously stop the script even if the problem was avoided by vartype conditions.

    In my experience this gets a LOT worse when the variable in question is an array received from RETURNED_PARAMETERS, LIBRARY_GLOBAL and file operations. I see that GS themselves would give the first element of each array an arbitrary value immediately after dimensioning, so that the interpreter will pick up the vartype. However this does not work all the time. I cannot consistently work out when it works and when it doens’t – seems sporadic.

    Bond Bryan Architects, Westerham, UK


  • Denny Wong
    Participant

    Thanks Barry, that’s quite a neat trick you have there, never thought about this! Now I can just throw a bunch of random objects to the origin, make that an object and write a script to extract all their parameters. Neat!

    I am in agreement with your other comments. Honestly I am not fussed about an UI for parameter extraction – if LP_​XMLConverter can produce a parameter-only XML from protected GDL, I’ll be happy already.

    Additionally many objects were not designed to be called as Macros; calculations were done in Parameter Script rather than Master Script, so when you CALL them the values do not react to your other parameters. When these are password protected, you have no choice but to duplicate their calculations which is a rather bad practice.

    All these just because we have a 9,000 polygon chair that does not offer any 3D Details level, and we have to create an “envelope” object to provide that…

    Bond Bryan Architects, Westerham, UK

Viewing 14 posts - 1 through 14 (of 14 total)