News:

When replying to a specific statement be sure to quote the previous post.

Main Menu

Data Fields in Multitext

Started by Chipgooding, September 22, 2026, 02:51:36 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Chipgooding

In AutoCAD, in the text editor window, there's an icon for "field" and this opens up a lot of options which include "Object". So for example I can select a polygon as the object, then select "Area" in the variables list in text editor field popup, then there are formatting options (Prefix, suffix, decimal character, thousands character, etc.).
This inserts a dynamic field with the area of the polygon in my text.
If I change the size of the polygon and regen, the field changes accordingly.

I'm trying to figure this out in TC Platinum 2026.

Any help appreciated.
Chip Gooding
chip.gooding@gmail.com
TC 2025 Platinum 64-bit
V 32.0 B 87.1
Lenovo Legion MS W11 home v10.0.26200 Build 26200
2TB SSD
12th Gen Intel(R) Core(TM) i9-12900HX, 2300 Mhz, 16 Core(s), 24 Logical Processor(s)
(RAM)   32.0 GB
Total Physical Memory   31.7 GB
Available Physical Memory   19.3 GB

lglauberman

Can you post a video demo of what you are doing in AutoCAD that you would like to do in TCW?
Lawrence Glauberman, LIG
TurboCAD 2024 Platinum, Lightworks
Bambu H2S w/AMS2, QIDI XPlus3

Alvin Gregorio

#2
Quote from: Chipgooding on September 22, 2026, 02:51:36 PMI'm trying to figure this out in TC Platinum 2026.
I was hoping Nikki (nikkipollard) would respond on this.  I think she would be the most versed and experienced in this in both TurboCAD and AutoCAD.

I think TurboCAD does not have an exact replica of the feature you are describing in AutoCAD.
But check out the "Database Tables and Reports" section in the User Guide.  It might serve your needs.

Example attached
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Chipgooding

Chip Gooding
chip.gooding@gmail.com
TC 2025 Platinum 64-bit
V 32.0 B 87.1
Lenovo Legion MS W11 home v10.0.26200 Build 26200
2TB SSD
12th Gen Intel(R) Core(TM) i9-12900HX, 2300 Mhz, 16 Core(s), 24 Logical Processor(s)
(RAM)   32.0 GB
Total Physical Memory   31.7 GB
Available Physical Memory   19.3 GB

Andy H

#4
I have no idea about AutoCAD.  And I also don't use the database / report, which Alvin suggested,  so maybe that will meet the needs. 

This just uses a simple macro to alter the text after an object has been created / adjusted.  its nothing special, I was just playing around.  Video shows its use. and the code can be copied and pasted into the macro palette.  If anyone tests it, don't forget to change the required 2D object ID number.

Important note.  In the video I used brush tool, instead of hatch.  All objects in TC have a unique ID.  If you hatch a 2D polyline, The hatch will have a different ID number to the original polyline.  This is simply because TC treats Hatch as a brand new object,  Hence the different ID.

Chip.  You could add a suggestion IN this thread.  though obviously that won't help you in 2026.

' ###########
' Note
' Works on the text object  Therefore After re-sizing an object. 
' Select the text and then run the macro.
' ###########

Dim ar  ' get area value
Dim sel  ' get selection (selected text)
Dim gr  ' get area graphic using iD number
Dim oid  ' Object ID number, manually entered

' ***************
' change value to the ID number of the graphic (not the text)

oid = 127

' ***************

On Error Resume Next
Set gr = ActiveDrawing.Graphics.GraphicFromID(oid)
ar = gr.Properties.Item("M_Area").Value
Set sel = ActiveDrawing.Selection(0)
sel.Name = "Area = " & (Round(ar,6))
sel.Update
ActiveDrawing.ActiveView.Refresh
Set gr = Nothing

The second bit of code below, is a simple macro to get an objects ID.  though there are other ways to get the ID.   Select an object then run the macro.  IT HAS NO error code, so add some if you are unsure.

Dim gr  ' variable for graphic object
Dim TCSel  ' Variable for selected object
Set TCSel = ActiveDrawing.Selection ' Gets the selected object.
gr = TCSel(0).ID  ' Gets the ID number from first object in selection.
MsgBox("ID number = " & gr) '  Displays the ID number in a message box.
 

Andy

nikkipollard

#5
I don't think you are able to add fields to text.

Try Property set definitions for something similar to the video.
I wrote a long explanation but I lost it
View the attached file to see how they work.
They are a pain to set up but you can save them in your Template file, which ultimately makes them more user friendly then the Autocad version, as you need to set up each graphic in the Acad version.

https://docs.imsidesign.com/projects/TurboCAD-2021/turbocad-2021-user-guide-publication/Annotation/Entity-Marks/

https://forums.turbocad.com/index.php?topic=27599.msg161561#msg161561

You can use the library to store entity marks and property sets - for quick access to them.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h