Home › Forums › Problems and solutions in GDL › Object design › Macros and hotspot2
Tagged: Hotspot
- This topic has 20 replies, 5 voices, and was last updated 7 years, 10 months ago by Laurits Frydenberg.
-
AuthorPosts
-
-
January 6, 2017 at 10:30 #2933Laurits FrydenbergParticipant
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
-
January 9, 2017 at 16:33 #2934Gergely FehérKeymaster
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 -
January 9, 2017 at 17:33 #2935Laurits FrydenbergParticipant
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
-
January 10, 2017 at 16:31 #2937Gergely FehérKeymaster
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 usecall "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 -
January 10, 2017 at 16:41 #2938Laurits FrydenbergParticipant
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
-
January 11, 2017 at 10:16 #2939Laurits FrydenbergParticipant
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
-
January 13, 2017 at 11:33 #2940Gergely FehérKeymaster
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
-
-
January 13, 2017 at 11:49 #2941Laurits FrydenbergParticipant
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
-
January 16, 2017 at 10:28 #2942Laurits FrydenbergParticipant
Here I have created an image that explains what is my problem.
Attachments:
Laurits Frydenberg
Technical drawing
-
January 23, 2017 at 12:55 #2946Laurits FrydenbergParticipant
Hello
Is anyone have idea on how I can solve this problem this.
Laurits Frydenberg
Technical drawing
-
January 26, 2017 at 15:45 #2950Laurits FrydenbergParticipant
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
-
January 26, 2017 at 22:17 #2951Joachim SühloParticipant
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 -
January 27, 2017 at 10:52 #2952Laurits FrydenbergParticipant
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
Attachments:
Laurits Frydenberg
Technical drawing
-
January 27, 2017 at 12:14 #2954Joachim SühloParticipant
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 -
January 27, 2017 at 16:19 #2955Laurits FrydenbergParticipant
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
-
January 27, 2017 at 16:49 #2956Péter BaksaKeymaster
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 onElement_type
parameter of your object, useGLOB_MODPAR_NAME
global variable to check whether last parameter modified was"Element_type"
, and if its new value is 2, setparameters B = 0.9
. Then you can call your macro in the 2D script usingPARAMETERS ALL
, the B parameter will be 0.9.Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SE -
January 27, 2017 at 17:16 #2957Laurits FrydenbergParticipant
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 sillyLaurits Frydenberg
Technical drawing
-
January 27, 2017 at 17:30 #2958Laurits FrydenbergParticipant
Many thanks everyone
After the last thing I got from Peter so it seems like I we shall doThanks thanks……
Laurits Frydenberg
Technical drawing
-
January 30, 2017 at 11:58 #2959Péter BaksaKeymaster
I recommend you to read this article:
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-
January 31, 2017 at 11:26 #2960Dominika BobályKeymaster
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
-
-
January 31, 2017 at 14:53 #2962Laurits FrydenbergParticipant
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
-
-
AuthorPosts
- The forum ‘Object design’ is closed to new topics and replies.