<?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: Autotext in 3D text in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251923#M4512</link>
    <description>Hi, sorry&lt;BR /&gt;
I don't know GDL.</description>
    <pubDate>Mon, 22 Jun 2020 14:00:23 GMT</pubDate>
    <dc:creator>eldhead</dc:creator>
    <dc:date>2020-06-22T14:00:23Z</dc:date>
    <item>
      <title>Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251921#M4510</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi!&lt;BR /&gt;I thought I could write &amp;lt;SHORTDATE&amp;gt; in object 3D text but it doesn´t seem to work. It had been great to show date in for example IFC-files.&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Sep 2022 20:53:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251921#M4510</guid>
      <dc:creator>eldhead</dc:creator>
      <dc:date>2022-09-26T20:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251922#M4511</link>
      <description>There is a GDL command you can use to get the Date and Time:&lt;BR /&gt;
&lt;BR /&gt;

&lt;PRE&gt;n = REQUEST ("DateTime", format_string, datetimestring)&lt;/PRE&gt;

&lt;BR /&gt;
Returns the current date and time as a formatted string in datetimestring. Uses the DateTime Add-On, opening and closing the required channel.&lt;BR /&gt;
format_string: Format string, described at paramString parameter of the section called “Opening Channel” .&lt;BR /&gt;
datetimestring: the formatted string is returned in this variable&lt;BR /&gt;
The requests cause warning if used in parameter script.</description>
      <pubDate>Tue, 09 Jun 2020 16:51:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251922#M4511</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2020-06-09T16:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251923#M4512</link>
      <description>Hi, sorry&lt;BR /&gt;
I don't know GDL.</description>
      <pubDate>Mon, 22 Jun 2020 14:00:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251923#M4512</guid>
      <dc:creator>eldhead</dc:creator>
      <dc:date>2020-06-22T14:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251924#M4513</link>
      <description>You cannot use autotext with that object as the internal code formatting required is different between displaying a parameter, the text you enter into the object settings, and displaying a static or autotext.&lt;BR /&gt;
&lt;BR /&gt;
This thread is regarding the AC object and not about actual scripting, though the actual modification required is pretty simple if that is all you are needing.&lt;BR /&gt;
&lt;BR /&gt;
Open the object&lt;BR /&gt;
3D Script&lt;BR /&gt;
Replace the following
&lt;PRE&gt;TEXT B, 0, f

with

TEXT B, 0, "&amp;lt;SHORTDATE&amp;gt;"&lt;/PRE&gt;
Save as new short date object.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ling.</description>
      <pubDate>Tue, 23 Jun 2020 01:49:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251924#M4513</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2020-06-23T01:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251925#M4514</link>
      <description>&lt;BLOCKQUOTE&gt;Lingwisyer wrote:&lt;BR /&gt;This thread is regarding the AC object and not about actual scripting&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
It needs scripting to solve the issue, as you just showed.</description>
      <pubDate>Tue, 23 Jun 2020 16:00:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251925#M4514</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2020-06-23T16:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251926#M4515</link>
      <description>Actually, just tested it, and &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;Autotext&lt;E&gt;&lt;/E&gt; does NOT work with the &lt;B&gt;Text&lt;/B&gt; command...&lt;BR /&gt;
&lt;BR /&gt;
Use the Date Time AO. Just place the following in the master or 3d script.&lt;BR /&gt;

&lt;PRE&gt;f = ""
ch = OPEN ("DateTime", "", "%d/%m/%y")
n = INPUT (ch, "", "", f)
CLOSE (ch)&lt;/PRE&gt;

&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ling.</description>
      <pubDate>Wed, 24 Jun 2020 02:45:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251926#M4515</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2020-06-24T02:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251927#M4516</link>
      <description>Ling,&lt;BR /&gt;
&lt;BR /&gt;
I think using the REQUEST command would be simpler as you then do not have to deal with opening and closing files, and the GDL Reference Guide says that this REQUEST command is actually using the DateTime I/O Extension.</description>
      <pubDate>Wed, 24 Jun 2020 04:25:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251927#M4516</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2020-06-24T04:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251928#M4517</link>
      <description>&lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;  This was harder than I thought, nothing works.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;</description>
      <pubDate>Thu, 25 Jun 2020 13:20:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251928#M4517</guid>
      <dc:creator>eldhead</dc:creator>
      <dc:date>2020-06-25T13:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251929#M4518</link>
      <description>The Date and Time Add-On demonstrated by Lingwisyer definitely works and allows you to manipulate the format. I use it in most of my GDL objects and just tested applying it to a 3D script and it works perfectly.&lt;BR /&gt;
&lt;BR /&gt;
After putting Lingwisyer's code into the Master Script then just put the text command in the 3D script. You will also want to consider defining the style and size of the text using a "Define Style" &amp;amp; "Set Style" function before the "text" command.&lt;BR /&gt;
&lt;BR /&gt;
All these GDL functions are explained in the GDL reference guide accessed via your help menu.&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;
!define style "name" "font", size, anchor, face code
define style "text 01" "Arial Narrow", 2.5, 5, 0

set style "text 01"

text 0, 0, f  ("f" is from Lingwisyer's script)

&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jun 2020 22:20:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251929#M4518</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2020-06-25T22:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251930#M4519</link>
      <description>Also remember to replace your object with the one you modified as you cannot modify GS library parts as they do not have an open CC licence. I think you will also need to use the Save As function as Save will do nothing, rather than defaulting Save As...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ling.</description>
      <pubDate>Fri, 26 Jun 2020 01:56:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251930#M4519</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2020-06-26T01:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251931#M4520</link>
      <description>Sometimes I just love you guys! Kristan &amp;amp; Lingwisyer this time  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_mrgreen.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I attach a small video on an origo object I just did and also a question related to the UI. I have a yes/no parameter and would like to grey out the "next" parameter if I choose no in the former.... the video explains it.&lt;BR /&gt;
I suppose I need to start building the UI with buttons and forms and stuff...haven't dared to go into that route yet since my time to do GDL is like nothing...this was on my spare time...I was a fun little practice and I couldn't stop until I was done. Two hours including a rewrite...(I admit I'm that slow at GDL)&lt;BR /&gt;
&lt;IFRAME width="640" height="360" src="https://www.youtube.com/embed/N1jUKz3RwXk" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""&gt;&lt;/IFRAME&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt; Mats</description>
      <pubDate>Wed, 03 Feb 2021 19:14:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251931#M4520</guid>
      <dc:creator>Mats_Knutsson</dc:creator>
      <dc:date>2021-02-03T19:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251932#M4521</link>
      <description>Looks good Mats!&lt;BR /&gt;
It so much fun getting intelligent responses out of your own GDL objects.&lt;BR /&gt;
There are two things you can do to the manual data parameter based on the on/off parameter; you can "Lock" it and you can "Hide" it. As you don't have a graphical UI I think it is best to just "Hide" it, then you don't have to lock it. But if you are going to create a UI then hiding doesn't work through the function shown below.&lt;BR /&gt;
&lt;BR /&gt;
The code would be as follows;&lt;BR /&gt;
assuming the on/of parameter is called: bManualDate&lt;BR /&gt;
assuming the manual date parameter is: stManualDate
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;if bManualDate = 0 then
        lock "stManualDate"
        hideparameter "stManualDate"
endif
&lt;/PRE&gt;

For on/off (boolean) parameters "0" is off and "1" is on. I personally don't like using the "0,1" values when writing my script because the idea of writing "=" for a boolean parameter bothers me, seeing as though it is only necessary for the off value; for example, if the value is on we simple write:
&lt;PRE&gt;if bManualDate then&lt;/PRE&gt;
because bManualDate returns the positive value of 1&lt;BR /&gt;
so for the negative we write:
&lt;PRE&gt;if not(bManualDate) then&lt;/PRE&gt;
because when it is turned off it equals "0", the negative response, so to run the "if" command we need a positive response so we turn it into a positive with the "not()" function as "not(0)" = "1". make sense?&lt;BR /&gt;
so I would write your code like this:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;if not(bManualDate) then 
        lock "stManualDate"
        hideparameter "stManualDate"
endif
&lt;/PRE&gt;
Writing it like this makes it easy to read what it is doing.</description>
      <pubDate>Wed, 03 Feb 2021 22:05:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251932#M4521</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2021-02-03T22:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251933#M4522</link>
      <description>&lt;BLOCKQUOTE&gt;Kristian wrote:&lt;BR /&gt;if bManualDate then&lt;BR /&gt;
/&lt;BR /&gt;
if not(bManualDate) then&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
I never thought to write it like that. Makes it sooooo much easier to track what is going on. Thanks for the tip.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ling.</description>
      <pubDate>Thu, 04 Feb 2021 01:02:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251933#M4522</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2021-02-04T01:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Autotext in 3D text</title>
      <link>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251934#M4523</link>
      <description>your welcome Ling.</description>
      <pubDate>Fri, 05 Feb 2021 01:01:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Autotext-in-3D-text/m-p/251934#M4523</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2021-02-05T01:01:01Z</dc:date>
    </item>
  </channel>
</rss>

