Macros and hotspot2

Home Forums Problems and solutions in GDL Object design Macros and hotspot2

Tagged: 

Viewing 18 reply threads
  • Author
    Posts
    • #2933
      Laurits Frydenberg
      Participant

      Hey guys
      I’m trying make a 3D foundation element that has 152 difference types. So I decided to use the macro to reduce job to make them.

      When I use (call parameter all), it seems everything is fine.

      But when I use (call parameter parameter1 = value, parameter2 = value, etc., Etc ..)

      Then I have a problem with moving hotspot2. They come up in the right place and I can move them, but they only go back to square one without moving it I will adjust.

      Is there anything that has an idea on what I can do with this.

      PS! That’s fine if you make a little example when I did not then of very well on GDL

      Thanks in advance

      Laurits

      Laurits Frydenberg

      Technical drawing

    • #2934
      Gergely Fehér
      Keymaster

      Please attach a sample file (in zip). It should work, so we need to check your solution to find the problem.

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #2935
      Laurits Frydenberg
      Participant

      Hello Gergely Fehér

      YES there is a good idea. Here you ZIP files and I have sent a PDF file that tells a bit on I must deliver to my client. You see there that I have to adjust elment to corners and up the windows and doors. That is what is IMPORTANT for me to get to.

      But friendly greeting

      Laurits Frydenberg

      Attachments:

      Laurits Frydenberg

      Technical drawing

    • #2937
      Gergely Fehér
      Keymaster

      If you give exact values to a macro (call "macro" parameters B = 0.9) then the macro will draw with this exact value… You should use call "macro" parameters B = B instead to be able to follow the changes of B parameter in your macro’s scripts.

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #2938
      Laurits Frydenberg
      Participant

      Hello Gergely Fehér

      Thank you very much this I will try to see if it helps me.

      Thanks again

      Laurits Frydenberg

      Laurits Frydenberg

      Technical drawing

    • #2939
      Laurits Frydenberg
      Participant

      Hello again Gergely Fehér

      I try your suggestion, but when was length the same on the same on all four as I should have.
      That I should have the length of 1200, 900, 600 and 450 mm and this is where I have to slightly adjust the lengths up door, windows and corners. Then it would have been easy to use hotspot to adjust the length.

      It’s possible I miss understood you. What I tried I was that I created two macros one that had parameters for the 1200 and the parameter 900.
      The 1200 I used (call macro_navn parameter all) then works out everything as it should with hotspots.
      But when I use when I use (call macro_navn parameter B = B, etc, etc, ..)
      when the length the same as 1200 but I can use hotspots but it is wrong length.

      What am I doing wrong?

      Thanks again

      Laurits Frydenberg

      Technical drawing

      • #2940
        Gergely Fehér
        Keymaster

        Sorry, I don’t understand what do you want to do. Please try to give a clear “requirement” for the functionality you need.

        Gergely Fehér
        Team Leader, Library Team
        GRAPHISOFT SE

    • #2941
      Laurits Frydenberg
      Participant

      Hi

      What I need is to get hotspot2 funke after I change size with call parameters with new values. So I can fine adjust these in plan.

      I have four different sizes for these and they are 1200, 900, 600, 450 mm long.

      Laurits Frydenberg

      Technical drawing

    • #2942
      Laurits Frydenberg
      Participant

      Here I have created an image that explains what is my problem.

      Attachments:

      Laurits Frydenberg

      Technical drawing

    • #2946
      Laurits Frydenberg
      Participant

      Hello

      Is anyone have idea on how I can solve this problem this.

      Laurits Frydenberg

      Technical drawing

    • #2950
      Laurits Frydenberg
      Participant

      Hello Gergely Fehér

      I wonder if you understand what I’m looking for I have not heard more from you.
      Or do you need any more information from me?

      Laurits Frydenberg

      Technical drawing

    • #2951
      Joachim Sühlo
      Participant

      Please check your Script, there is at least one script error at this line:
      HOTSPOT2 ST +AA +TU +0.075 , 0, unID, STX, 1+128: unID=unID+1 !!!POINT BASE
      You wrote STX where I have corected it to zero.
      Now that hotspots maybe work correctly.

      GDL Object Developer
      b-prisma
      MAC OSx 10.14

    • #2952
      Laurits Frydenberg
      Participant

      Thanks Joachim Sühlo

      I checked my script as you said, I try to set STX to zero. But that did not help either. As you see will become STX call parameter STX = -0.075 so when the item is also wrong when I want a 1200 element.

      Have you or any other one idea on how I solve this problem.

      Or whether it is possible to retrieve a GM file in its entirety into the file that I call element

      Thanks

      Laurits Frydenberg

      Technical drawing

    • #2954
      Joachim Sühlo
      Participant

      I don’t understand why you set STX to -0.075 in the CALL. If STX has a fixed VALUE, you cannot change it by Hotspot. If you want to change STX by a Hotspot, you must set STX = STX.

      GDL Object Developer
      b-prisma
      MAC OSx 10.14

    • #2955
      Laurits Frydenberg
      Participant

      This worked but I thought that it was possible to put them out with a fixed value.
      But it is not possible to lay them with a fixed value as the item is in the dimension I want to start with and then use hotspots to adjust it to a different value to the desired length.
      If possible how I can do it?

      Laurits Frydenberg

      Technical drawing

    • #2956
      Péter Baksa
      Keymaster

      Hi!

      I don’t know if I understand you correctly, but maybe what you need is setting the parameter value before the macro call. You can do that in the parameter script with the PARAMETERS command. I see 1200/900 setting depends on Element_type parameter of your object, use GLOB_MODPAR_NAME global variable to check whether last parameter modified was "Element_type", and if its new value is 2, set parameters B = 0.9. Then you can call your macro in the 2D script using PARAMETERS ALL, the B parameter will be 0.9.

      Péter Baksa
      Library Platform, Software Engineer
      GRAPHISOFT SE

    • #2957
      Laurits Frydenberg
      Participant

      Thanks Péter Baksa
      How exactly put it into parameter script Peter
      I’m sorry I’m new to using GLD so I feel a little silly

      Laurits Frydenberg

      Technical drawing

    • #2958
      Laurits Frydenberg
      Participant

      Many thanks everyone
      After the last thing I got from Peter so it seems like I we shall do

      Thanks thanks……

      Laurits Frydenberg

      Technical drawing

    • #2959
      Péter Baksa
      Keymaster

      I recommend you to read this article:

      09. Parameter logic

      The sections Changing the value of a parameter, and Connections between parameters can be used in your case.

      Péter Baksa
      Library Platform, Software Engineer
      GRAPHISOFT SE

      • #2960
        Dominika Bobály
        Keymaster

        Moreso, you can try to use the VALUES command to set a discrete value-list for you parameter.
        For example: “B” only should be working at 500, 200, 350, then:
        values "B" 500, 200, 350
        If you add a hotspot for “B” editing, it will jump to the previously set values only.

        Dominika Bobály
        Product Manager
        GRAPHISOFT SE

    • #2962
      Laurits Frydenberg
      Participant

      Hi all.

      I can tell that my problems solved now.

      The solution was to use:

      if GLOB_MODPAR_NAME = "ELEMENT_TYPE" then
      if ELEMENT_TYPE = 2 then parameter B = 0.9,
      OS2 = 0.15, OS = 0.15, STX = -0.075, MKEN = 0225
      endif

      I want to thank everyone lots of good help 🙂

      Laurits Frydenberg

      Technical drawing

Viewing 18 reply threads
  • The forum ‘Object design’ is closed to new topics and replies.