<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Parametric text in stretchable 2D object in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/670984#M7872</link>
    <description>&lt;P&gt;You will need to script adjustable or 'graphical editing' hospots for the corners of the box.&lt;/P&gt;
&lt;P&gt;Have a look in the GDL manual for 'graphical editing using hotspots'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jul 2025 04:38:25 GMT</pubDate>
    <dc:creator>Barry Kelly</dc:creator>
    <dc:date>2025-07-25T04:38:25Z</dc:date>
    <item>
      <title>Parametric text in stretchable 2D object</title>
      <link>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/670880#M7870</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I'm trying to script a 2D object with parametric text.&lt;/P&gt;
&lt;P&gt;Problem is, when object is stretched smaller than text size - there is no possible to regain stretching option in plan view, because bounding box hotspots are outside object itself hotspots.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the 2D code for example object -&lt;/P&gt;
&lt;P&gt;============================================&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;RECT2 0, 0, A, B

! Hotspots for stretching
HOTSPOT 0, 0, 1
HOTSPOT A, 0, 2
HOTSPOT A, B, 3
HOTSPOT 0, B, 4

! Text style
DEFINE STYLE "NoStretch" "Arial", 1, 5, 0
SET STYLE "NoStretch"

! Text placement
TEXT2 A/2, B/2, label&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;==========================================&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Is there a way to make text appear outside object and preserve functionality of object stretching, even if it is smaller than text?&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kaspars_0-1753359331259.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/89986i9394D99CD3085A9E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kaspars_0-1753359331259.png" alt="Kaspars_0-1753359331259.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Thank You in advance,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Kaspars Kalniņš&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="grey"&gt;Operating system used: &lt;EM&gt;Windows &lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Jul 2025 13:10:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/670880#M7870</guid>
      <dc:creator>Kaspars</dc:creator>
      <dc:date>2025-07-24T13:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Parametric text in stretchable 2D object</title>
      <link>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/670902#M7871</link>
      <description>&lt;P&gt;I have not done this in GDL before but I think you can use the following request the get the exact width of a Text Block:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;n = REQUEST ("TEXTBLOCK_INFO", textblock_name, width, height)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;Returns in the given variables the sizes in x and y direction of a text block previously defined via the TEXTBLOCK command.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;The sizes are in mm or in m in model space depending on the fixed_height parameter value of TEXTBLOCK&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;(millimeters if 1, meters in model space if 0 ). If width was 0, the request returns the calculated width and height,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;if width was specified in the text block definition, returns the calculated height corresponding to that width.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Expression returns 0 and contains dummy return values (emtpy string or 0) if used in parameter script, causing additional warning.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you know the width of the Text Block then my guess is that after each change, you can make sure that the bounding box of the Library Part is always the same size as the Text Block?&lt;/P&gt;
&lt;P&gt;Someone please correct me if I am wrong about this.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2025 13:47:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/670902#M7871</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2025-07-24T13:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Parametric text in stretchable 2D object</title>
      <link>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/670984#M7872</link>
      <description>&lt;P&gt;You will need to script adjustable or 'graphical editing' hospots for the corners of the box.&lt;/P&gt;
&lt;P&gt;Have a look in the GDL manual for 'graphical editing using hotspots'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 04:38:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/670984#M7872</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2025-07-25T04:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Parametric text in stretchable 2D object</title>
      <link>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/670988#M7873</link>
      <description>&lt;P&gt;We're in the wrong sub...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the sounds of it, the text is the annotation, not the frame, for the shape, so custom hotspots would be the way to go. Toggling edittable base hotspots will allow you to use a single set of hotspots (edittable hotspots require 3 actual hotspots) to control the axis of two adjactent corners. Or you could just script two sets for say the top right corner and have that as your size adjustment. Also, you should be using&amp;nbsp;&lt;STRONG&gt;HOTSPOT2&lt;/STRONG&gt;, hence why you are getting bounding box hotspots instread of the ones you are scripting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ling.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 05:57:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/670988#M7873</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2025-07-25T05:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Parametric text in stretchable 2D object</title>
      <link>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/671040#M7874</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Thank's, Ling!&lt;/P&gt;&lt;P&gt;Problem was so obvious and simple! I just forgot to use&amp;nbsp;&lt;STRONG&gt;HOTSPOT2 &lt;/STRONG&gt;instead of&amp;nbsp;&lt;STRONG&gt;HOTSPOT&lt;/STRONG&gt;,&amp;nbsp;haaha.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now it is possible to stretch my rectangle even if it is smaller than annotation text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS&lt;/P&gt;&lt;P&gt;I'm still curious how to use TEXTBLOCK , PARAGRAPH and RICHTEXT,&amp;nbsp; commands. Have not seen working simple example code on net so far .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kaspars.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 10:56:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/671040#M7874</guid>
      <dc:creator>Kaspars</dc:creator>
      <dc:date>2025-07-25T10:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Parametric text in stretchable 2D object</title>
      <link>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/671061#M7875</link>
      <description>&lt;P&gt;You can use&amp;nbsp;&lt;SPAN&gt;TEXTBLOCK , PARAGRAPH and RICHTEXT to get Texts with linebreaks, while you are strechting the textbox.&lt;BR /&gt;See download for a simple &lt;A href="https://download.b-prisma.de/objekte/Richtext_Makro_JS27.gsm" target="_self"&gt;example object&lt;/A&gt;.&lt;BR /&gt;On the Graphisoft GDL Website you can find other examples:&amp;nbsp;&lt;A href="https://gdl.graphisoft.com/tips-and-tricks/" target="_blank"&gt;https://gdl.graphisoft.com/tips-and-tricks/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 15:40:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Parametric-text-in-stretchable-2D-object/m-p/671061#M7875</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2025-07-25T15:40:53Z</dc:date>
    </item>
  </channel>
</rss>

