Home › Forums › Problems and solutions in GDL › Object design › Door and Window Marker
- This topic has 3 replies, 2 voices, and was last updated 6 years, 6 months ago by
Barry Kelly.
-
AuthorPosts
-
-
October 2, 2018 at 23:34 #4275
Eric Bergquist
ParticipantGood morning everyone
I am just working thru a simple Door and Window marker to display information in a format one of our client wants
I have a question – why when I add a HOTSPOT2 it shows the hotspot but doesn’t allow the marker to be dragged?
Cheers
Eric
2D code as follows:
DEFINE STYLE "id" AC_TextFont_1, AC_TextSize_1, 5, AC_TextStyle_1 DEFINE STYLE "dims" AC_TextFont_1, (AC_TextSize_1 * 0.75), 5, AC_TextStyle_1 STYLE "ID" widoTypeID = "" hotspot2 0,1 rrr = REQUEST("AssocLP_ParValue", "widoTypeID", parIndex, parType, flags, dim1, dim2, widoTypeID) ADD2 0, 1 PEN AC_TextPen_1 ! See if there is a window type id set IF widoTypeID = "" THEN TEXT2 0, 0, ac_wido_id ELSE TEXT2 0, 0, ac_wido_id + " (" + widoTypeID + ")" ENDIF ADD2 0, -((AC_TextSize_1 * glob_scale / 1000) * 1.5) ! Add the window dimensions h x w STYLE "dims" TEXT2 0, 0, STR((ac_wido_b_size * 1000), 4, 0) + " " + GS_Separator + " " + STR((ac_wido_a_size * 1000), 4, 0) ! Remove all transformations DEL TOP
Archicad 8 then 20-22
-
October 3, 2018 at 02:55 #4276
Barry Kelly
ParticipantThat is just a simple hotspot.
It is not a graphical (adjustable) hotspot.You need to add the graphical hotspots and then an ADD2 x,y to transform your marker position to match the hotspot values.
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 -
October 5, 2018 at 10:46 #4277
Eric Bergquist
ParticipantHi Barry
Thanks for the reply to my question
Are you able to ‘dumb’ it down a little for me please … unfortunately the last time I was using GDL was back around Archicad 8 so most of my knowledge has gone since then
I thought the hotspot gave the user and node where they could then manipulate the object – stretch or move
CHeers
Eric
Archicad 8 then 20-22
-
October 8, 2018 at 03:38 #4281
Barry Kelly
ParticipantA single HOTSPOT2 command will place a black hotspot that can be used to select or drag the entire object.
I won’t drag just a portion of the object.To stretch just a portion you must use ‘Graphical’ hotspots.
These are a series of commands that produce a purple (may depend on you Archicad settings) diamond shaped hotspot that can be dragged in plan (also can be used in 3D).
You then use an ‘ADD2 x,y’ command before the part of the script you want to drag and a ‘DEL 1’ after it.
This way you can control just a portion of your object.The hotspots will be something like this.
!Stretchy x HOTSPOT2 0, off_ver, 1, off_hor, 1+128 !base HOTSPOT2 -1, off_ver, 2, off_hor, 3 !reference HOTSPOT2 off_hor, off_ver, 3, off_hor, 2 !moveable !Stretchy y HOTSPOT2 off_hor, 0, 4, off_ver, 1+128 !base HOTSPOT2 off_hor, -1, 5, off_ver, 3 !reference HOTSPOT2 off_hor, off_ver, 6, off_ver, 2 !moveable ADD2 off_hor, off_ver .... object script.... DELL 1
This create a single hotspot that drags both the horizontal (x) and vertical (y) position at the same time.
You will find more info on Graphical hotspots in the GDL reference manual.
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
-
-
AuthorPosts
- The forum ‘Object design’ is closed to new topics and replies.