Autotext in 3D text

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-09
05:27 PM
- last edited on
2022-09-26
10:53 PM
by
Daniel Kassai
I thought I could write <SHORTDATE> in object 3D text but it doesn´t seem to work. It had been great to show date in for example IFC-files.
- Labels:
-
Library (GDL)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-09 06:51 PM
n = REQUEST ("DateTime", format_string, datetimestring)
Returns the current date and time as a formatted string in datetimestring. Uses the DateTime Add-On, opening and closing the required channel.
format_string: Format string, described at paramString parameter of the section called “Opening Channel” .
datetimestring: the formatted string is returned in this variable
The requests cause warning if used in parameter script.
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-22 04:00 PM
I don't know GDL.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-23 03:49 AM
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.
Open the object
3D Script
Replace the following
TEXT B, 0, f with TEXT B, 0, "<SHORTDATE>"Save as new short date object.
Ling.
AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-23 06:00 PM
Lingwisyer wrote:
This thread is regarding the AC object and not about actual scripting
It needs scripting to solve the issue, as you just showed.
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-24 04:45 AM
Use the Date Time AO. Just place the following in the master or 3d script.
f = "" ch = OPEN ("DateTime", "", "%d/%m/%y") n = INPUT (ch, "", "", f) CLOSE (ch)
Ling.
AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-24 06:25 AM
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.
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-25 03:20 PM



- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-26 12:20 AM
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" & "Set Style" function before the "text" command.
All these GDL functions are explained in the GDL reference guide accessed via your help menu.
!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)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-26 03:56 AM
Ling.
AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |