GLOB_​​FEEDBACK_​​MODE in macros

Home Forums Problems and solutions in GDL Informations from the environment GLOB_​FEEDBACK_​MODE in macros

This topic contains 3 replies, has 2 voices, and was last updated by  Barry Kelly 6 months, 2 weeks ago.

  • Author
    Posts
  • #18619

    Barry Kelly
    Participant

    Is there a way to use GLOB_FEEDBACK_MODE in a CALLed macro?

    It is easier to explain what I mean with an example.

    I am placing a box around text so I can see the extent of the text as I drag it with a moveable hotspot in plan.
    All is good if the text is scripted in the object.
    A simple IF GLOB_FEEDBACK_MODE = 1 and then place a rectangle.

    However, if my object calls a macro that places the text, I can not use GLOB_FEEDBACK_MODE in the macro, as it does not seem to recognise that the master object is being amended (hotspot being moved).

    Is there a way to pass onto the macro the fact that the master object is being edited?

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

  • #18622

    Péter Baksa
    Keymaster

    Hi Barry,

    all globals should work in macros too. Check that you are calling the macro properly (is the macro 2D script run at all, are parameters passed)?

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

  • #18623

    Barry Kelly
    Participant

    The text macro is called from the 2D script of my window object.
    The values of the text to be shown is all sent correctly as the placed window shows the correct text.

    The text macro is all done in the 2D script.
    If I comment out the “IF GLOB_FEEDBACK_MODE = 1” line and just have the rectangle, then that shows on my window in plan.
    But I only want the rectangle to show if there is feedback (editing of hotspot).

    I will see create a simple object that does the same CALL and will see if I can get that to work.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

  • #18625

    Barry Kelly
    Participant

    I have no real idea why but it seems to all be working now.

    I tried a simple object calling a text macro – that worked.
    I found a window and made it call the same text macro – it worked.
    I went back to my original window which called its own text macro – it didn’t work.
    I noticed the text width was being calculated inside the IF/THEN statement, so I moved it – still didn’t work.

    I changed the CALL with listed parameters to CALL PARAMETRS ALL – and it worked.
    I changed it back and it worked.
    It seems that somehow saving the actual window object did the trick – even though I was only making the change in the macro.
    But even stranger, all of my other windows are now working and I haven’t re-saved any of them.

    Anyway, crisis averted.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

The forum ‘Informations from the environment’ is closed to new topics and replies.