License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Was Stretchy, Now It's Not

Anonymous
Not applicable
In an earlier version of the code shown below, you could stretch length A using one or the other of the hotspots shown in red. In the process of making a few changes, this functionality went away. I have tried everything I can think of to get it back. I didn't program this behavior in the first place, it just worked. Help!

100: !!DEFINE TEXT STYLE
DEFINE STYLE "AC_STYLE_1" pTextFont, pTextSize / 2.54, 5, 0
SET STYLE "AC_STYLE_1"

110: !!DRAW GRID LINE AND HOTSPOTS
PEN pLinePen
LINE_TYPE pLineType
HOTSPOT2 0, 0
HOTSPOT2 0, A / 2
HOTSPOT2 0, -A / 2

LINE2 0, -A / 2, 0, A / 2
HOTLINE2 0, -A / 2, 0, A / 2

120: !!ADD FIRST BUBBLE
ADD2 0, A / 2 + (pBubSize * GLOB_SCALE)
GOSUB 200
DEL 1

130: !!ADD SECOND BUBBLE IF REQUIRED
IF pBubLoc = `Both Ends` THEN
ADD2 0, -A / 2 - (pBubSize * GLOB_SCALE)
GOSUB 200
DEL 1
ENDIF

BODY -1
END


200: !!BUBBLE
LINE_TYPE pBubLineType
PEN pTextPen
ROT2 -SYMB_ROTANGLE
TEXT2 0, 0, pBubNum
DEL 1
PEN pBubPen
CIRCLE2 0, 0, pBubSize * GLOB_SCALE
HOTARC2 0, 0, pBubSize * GLOB_SCALE, 0, 360
HOTSPOT2 0,0
HOTSPOT2 0,pBubSize * GLOB_SCALE
HOTSPOT2 0,-pBubSize * GLOB_SCALE
HOTSPOT2 pBubSize * GLOB_SCALE,0
HOTSPOT2 -pBubSize * GLOB_SCALE,0
RETURN
11 REPLIES 11
Laszlo Nagy
Community Admin
Community Admin
Matthew stated the way it works. When you grab any hotspot, ArchiCAD checks whether there is any hotspots in the Object that is at a distance of A in the horizontal direction. If there is any, the object will be stretchable in the horizontal direction.
Similarly, it checks whether there is any hotspots in the Object that is at a distance of B in the vertical direction. If there is any, the object will be stretchable in the vertical direction.

If you add another hotspot:

rect2 0,0,a,b
rect2 0,0,a*.5,b*.5
hotspot2 0,0
hotspot2 a*.5,b*.5
hotspot2 a,b
hotspot2 -a*.5,-b*.5


then the hotspot at a*.5,b*.5 will also be stretchable in both directions.

But if you do the the following:

rect2 0,0,a,b
rect2 0,0,a*.5,b*.5
hotspot2 0,0
hotspot2 a*.5,b*.5
hotspot2 a,b
hotspot2 -a*.5,b*.5


the hotspot at a*.5,b*.5 will be stretchable only in the horizontal direction as there is another hotspot that is at a distance of A in the horizontal direction (-a*.5,b*.5), but there is no other hotspot that is at a distance of B in the vertical direction.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Anonymous
Not applicable
Thanks for the information on adding the additional hotspot. I was unaware of the effect it would have. So, basically, in order to have multiple strechable points based on "A", it requires more than 2 hotspots.

I have been using the diamond spots for strechable points, but this may be a simpler approach for some of the objects I'm working with.