GDL
About building parametric objects with GDL.
SOLVED!

GDL Debugging a placed object

scottjm
Advisor

Hi All,

 

Am trying to get the GDL Debugger to work on a place instance of an object but not having much luck.

 

I have followed the instructions here: https://gdl.Graphisoft.com/tips-and-tricks/how-to-use-the-gdl-debugger  and I think I'm doing everything right but it doesn't seem to be working.  The fact that these instructions are slightly out of date probably doesn't help.

 

This is the steps I am following:

1. I have the GDL editor open on the 2D (or 3D window).

2. I open the GDL Debugger, and click Selection... while I have the placed object selected.  The GUID of the placed instanced and the gsm name get filled in.

3. I go back to the main floorplan or 3D model view - not the 2D or 3D views within the GDL editor.

4. GDL Debugger disappears.

5. I force a refresh and rebuild on the floorplan or 3d model.

6.  I reopen the GDL editor, GDL debugger reappears, and there a collection of Parameter (OK), 2D (OK) and 3D (OK) in the output window but nothing else appears to happen.  The BREAKPOINT play step in etc buttons remain greyed out.

scottjm_0-1672376094556.png

The Execute, Playback and Dump Pars buttons also appear to do nothing.

 

If I just press 'Run with Default Params' button, then GDL Editor 2D View (or 3D View window) appears, and I can jump to the first breakpoint I have added to my script, and then step line by line and watch the 2D or 3D generation.

 

Thanks,

Scott

 

 

Scott J. Moore | Fulton Trotter Architects | BIM Manager, Associate, Architect
Since AC13 | Current versions AC23.7000 & AC26.5002 | BIMCloud Basic | Python, GDL, VBA, PHP, SQL, CSS
Certified Graphisoft BIM Manger (2022)
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Peter Baksa
Graphisoft
Graphisoft

Hi,

select one of the listed runs, and then press Execute or Playback.

Péter Baksa
Software Engineer, Library
Graphisoft SE, Budapest

View solution in original post

6 REPLIES 6
MetalFingerz
Advocate

Hello @scottjm 

 

I've used the debugger scarcely and it seemed that it really is two parts : the top one is for the object editor where you can add parameter names and use breakpoints to see their values and the bottom one that checks the object that is instantiated.

 

That's how I ended up understanding it but maybe I've used it wrong. Myself, I use PRINT statements as a way to dump param values and debug instantiated objects...

DGSketcher
Legend

@scottjm I have tried to get my head round the debugger and failed, but same as @MetalFingerz I can usually build in checks to identify the problem areas, some of which aren't immediately obvious until you isolate bits of code. Using GOSUB in your coding can speed up isolating problems.

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
runxel
Legend

The linked manual is not only hopelessly out of date, it also lists more limitations than it to be considered useful. 😂

I also have never bothered to try and incorporate it my workflow. PRINT all the way!

But let's hit @Peter Baksa, he should be able to shed some light on it. (:

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
Hmooslechner
Moderator

In most cases, i use the normal "Text"-command to write down the parameter-values during developing direct in the 2D (or also in 3D with 3D-Texts) - mostly, to get the right numberings or to check calculations like angles or distances, to see them direct in the resulting sketches or objects.

 

Its not necessary to see every value of every parameter in every step - with the use of text - you can point on the important values directly. So - i never used this debugger.

 

Just make a (small enough ) style für this Text-commands before using them

 

Another way for checking right calculations i use -  is to make visible circles - radiuses (circle2D) - where i can see calculated distances directly without having got the right angles before.

(where do intersect 2 circles - is it the right calculated point..??  )

 

In 3D, i also use the Circle - command to 3D-control the right xyz-Place of the exact place after the coordinate-shifting at the time, because circles can be seen very easy in complex situations - also in defining cutplanes.

 

Visually controlling the right function of my code during developing complex situations is essential for my style of coding.

 

This is also the purpose, i don't use extern scripting-editors, because i nearly check every single step in this ways and it would be much too slow even with copy-paste between extern editors and the builtin, not to speak of using XML-converters.

 

In simple objects, its easy and very fast, to use the 2D-3D GDL-builtin window, but, if you begin to use editable hotspots, you will have to strg+s every single step for control the right function of editable hotspots in the real drawingeditors. (That time  - to just simply save the object -  until it reacts in the editor is still too long and for me "not usable" with external editors)

 

In some cases, i don't remove the control text, because the User can use it as well: here for example the Z-hights of the points of my streetparts displayd in 2D: 

 

https://community.Graphisoft.com/t5/Parametric-Object-Factory/Streetparts-curve-with-bezier-geometry...

AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia
Solution
Peter Baksa
Graphisoft
Graphisoft

Hi,

select one of the listed runs, and then press Execute or Playback.

Péter Baksa
Software Engineer, Library
Graphisoft SE, Budapest

Amazing! Thank you @Peter Baksa! seems so obvious now that you say it. 
And thanks for all your feedback everyone else, I’ve always used Print extensively too but it always seemed so primitive, being able to see how the script actually progresses through the code is super helpful. 

Scott J. Moore | Fulton Trotter Architects | BIM Manager, Associate, Architect
Since AC13 | Current versions AC23.7000 & AC26.5002 | BIMCloud Basic | Python, GDL, VBA, PHP, SQL, CSS
Certified Graphisoft BIM Manger (2022)
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe