News:

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

Main Menu

Text along Curve

Started by knute971, May 25, 2026, 06:50:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

knute971

I have been trying to place text along the top quadrant of a circle but cannot get the desired effect.

I have tried numerous trials with circles and arcs, and the text simply does not appear where I want it to.  In addition, several times TC2022 locked up on me when trying. Searching this forum I did find a 2020 posting, but that was not helpful.

In the picture posted, I selected the upper quadrant of the circle and just accepted the text properties without changing. The text posted at the bottom quadrant.  I repeated this on an arc and the text split as shown, not even on the arc.  Using the flip feature in text properties also was no help.

After about 20 different tries and 3 lockups, I decided to ask for help on this forum.

You cannot view this attachment.
DC16, TC14, TC17, TC Platinum 2021 & 2022
Dell XPS-8940 - Windows 11 Pro
NVIDIA(R) GeForce RTX(TM) 3060 12GB GDDR6
11th Gen Intel Core i9 11900K
32GB, 16Gx2, DDR4, 2933MHz
3D Printer: Ender 3 V3 SE

lglauberman

I've done this by doing 1 letter at a time, and rotating the circle and letters after each letter.

There's probably a better way but that's what I have done in the past.
Lawrence Glauberman, LIG
TurboCAD 2024 Platinum, Lightworks
Bambu H2S w/AMS2, QIDI XPlus3

lglauberman

Here's an example. I drew the outer circle to make it easy to rotate everything.

You cannot view this attachment.
Lawrence Glauberman, LIG
TurboCAD 2024 Platinum, Lightworks
Bambu H2S w/AMS2, QIDI XPlus3

Andy H

#3
Text along curve is an old SDK tool. As far as I can tell, text is written from the start point along a curve / arc.  However the default for an arc it is anticlockwise,  meaning the text on top of an arc will be reversed.  i.e. right to left.

One can flip the arc (Y axis), or one better still is using an actual curve.  draw a spline from left (start point) to right (end point). simulating an arc.

Once in place, apart from some rotation to rotate along the curve. Do Not alter it, or it can break.

In the distant past, I've also used 'Graphic on path' to align characters with a path, but that's been broken for a while, (at least on my computer).

Personally,  I think Lawrence's way is better.

Alvin Gregorio

Attached is the best I could do, in 20 minutes of experimenting.   It uses a Polyline Arc Segment.

The fundamental and first issue, as Andy stated, is the direction TurboCAD stubbornly draws Circles and Arcs.  No matter how we edit the Start and End nodes, set the Start and End Angles in Selection Info, set Options/Angle Clockwise or Counterclockwise.
   My custom Arrowheads Line Style shows that, as I am trying all the different variations.
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)

lglauberman

Just another method - Radial Copy and then change the letters.

See this example video.
Lawrence Glauberman, LIG
TurboCAD 2024 Platinum, Lightworks
Bambu H2S w/AMS2, QIDI XPlus3

knute971

I tried Lawrence's approach and placed a single letter at the top quadrant of the circle. Then I relocated the reference point of that letter to the center of the circle and rotated the letter into the desired position.

Not happy with the net result since subsequent letters are not pointing towards the circle center.
You cannot view this attachment.

Alvin,
How did you get the lettering so evenly spaced?
DC16, TC14, TC17, TC Platinum 2021 & 2022
Dell XPS-8940 - Windows 11 Pro
NVIDIA(R) GeForce RTX(TM) 3060 12GB GDDR6
11th Gen Intel Core i9 11900K
32GB, 16Gx2, DDR4, 2933MHz
3D Printer: Ender 3 V3 SE

knute971

Lawrence,

Just looked at the video and that might work.  Too bad that Text Along Curve doesn't work as intended.  Would be a lot less work!
DC16, TC14, TC17, TC Platinum 2021 & 2022
Dell XPS-8940 - Windows 11 Pro
NVIDIA(R) GeForce RTX(TM) 3060 12GB GDDR6
11th Gen Intel Core i9 11900K
32GB, 16Gx2, DDR4, 2933MHz
3D Printer: Ender 3 V3 SE

Alvin Gregorio

Quote from: knute971 on May 25, 2026, 12:03:39 PMAlvin,
How did you get the lettering so evenly spaced?
It's the Text_Along_Curve tool.  Nothing too special.
I do find that trying to Edit it after insertion doesn't result in the outcome we're after.  Best to just Insert again, having learned from the previous insertion(s).

I typically use Lawrence's method. The Radial Copy one.

But I've used TAC plenty of times over the years, in my 2D Drawings.  It used to be a little less flaky.
I think once one experiments with it enough, one can get used to it and get it to suit their purpose fairly quickly.  Albeit, on a Polyline or something other than an Arc or Circle.
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)

lglauberman

Knute, once you get the text created you can rotate it to accommodate.

In this case since we have 14 characters including spaces, you would center the letters by rotating the entire thing by 48.75°.

Example video.
Lawrence Glauberman, LIG
TurboCAD 2024 Platinum, Lightworks
Bambu H2S w/AMS2, QIDI XPlus3

Steve Edwards

A clever bit of lateral thinking, Lawrence—this trick is worth remembering. As Andy has already said, the TC tool is hopeless; no matter how many mirror operations you apply, it's never correct.
TurboCAD Platinum 2024
NVIDIA RTX 4000
12th Gen Intel(R) Core(TM) i9-12900K   3.20 GHz
Windows 11 Pro (64)
64 GB RAM
Bambu P1S with AMS

Alvin Gregorio

Attached is via using the Text_Along_Curve tool.
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)

Alvin Gregorio

I can get Text_Along_Curve to work fairly consistently.
As long as I don't use a 360° arc (a Circle).

For simplicity's sake, let's say we're working on the World Workplane.
>Insert a Circle.
>With the Selector 3D toggled, select that Circle.
>In Selection_Info/Metrics, change the Start Angle and Finish Angle such that the gap between them will be opposite the equator of the Circle from where you want to insert the center of your Text_Along_Curve text.  For example, if I want my TAC text to be at the top— what is typically 90°— I set the Start Angle of the Circle to be at 271 and the Finish Angle to be at 269. (if you get a 2° arc, reverse those values)  That's a much bigger arc then required; but at least it allows for a very large TAC text string.
>Rotate the Circle (now Arc) about the Y-Axis 180°, essentially flipping it like a pancake.
>With the Workplane still set to World, insert your Text_Along_Curve.
>>It works<<
>View it from World Plan View

>Note that the first insertion sets the length of the text string.  If you try to edit it to have less characters than the initial insertion, it will increase the space between the remaining characters to make the text string the same length it was initially.
>Similarly, if you add characters, if will squish the spaces between characters.
>Best to insert new rather than Edit, if you want to change the text of the TAC text.
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)

Alvin Gregorio

#13
A video showing the long explanation in my just-previous post:
  note that the World Plan view is on the left; Bottom view is on the right

TIP:  It seems that TAC Text Height space units is always "Text Box Height".
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)

nikkipollard

Have you tried using a polyline instead of an arc?
Arcs are always Anticlockwise, polylines have direction So you have more control.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

nikkipollard

#15
I tested the polyline tool and it works with the text on a curve tool.
I hate this tool.
 
Years ago when I was learning how the SDK works, I wrote this script.
It runs from the macro recorder.
Select normal Single line text - not multiline text.
And run the macro.
Text on the top of a circle is clockwise and text on the bottom of an arc is anticlockwise.
It's not parametric like the built in tool but it is super fast and I think the results are more predictable.
The new text is a group of letters arranged in an arc format.
Option Explicit
                                                             
'=====================================================================
' ## Re WRITES SELECTED TEXT  - to follow an arc
'=====================================================================
Dim TcDraw
Dim Gsel

Call Main

Set TcDraw = Nothing
Set Gsel = Nothing

'_______________________________________________________________________________
Sub Main
 Set TcDraw = ActiveDrawing
 Set Gsel = TcDraw.Selection

Dim SF
SF = 1.02        '## SPACING FACTOR adjust for wider spacing
 
'# check if any graphics are selected
 If Gsel.Count <1 Then
    MsgBox "Nothing Selected"
    Exit sub
  End If

 '# First graphic in selection
 Dim gfx
   Set gfx = Gsel(0)

 '# check if selected graphic is text
 If gfx.Type <> "TEXT" Then
  MsgBox "Wrong type of graphic selected"
  Exit sub
 end If

 gfx.Vertices.UseWorldCS = True

 '# get Words of selected text
 Dim str : str = gfx.Properties.Item("Info").Value

 '# split the word into individual characters - see Sub routine
 Dim CHarray
  Call ToCharacterArray( str,CHarray)

 '# get direction and radius from user
 Dim Dir : Dir = Inputbox("Direction" & vbcrlf & "1. Anticlockwise" & vbcrlf & "2. Clockwise","",2)
 Dim R : R = InputBox("Radius","",1000)

 '# if the input box returned 0 then cancel was pressed - so leave the sub routine
  If R = 0 Then Exit Sub

Select Case Dir
Case 0
Exit Sub
Case 1
Dir = 1
Case 2
Dir = -1
Case Else
Dir = 1
End Select


'#convert the Radius to a double
 R=Cdbl(R)

 '# add an empty group to the active drawings graphic collection
 Dim g
 Dim Group : Set Group = TcDraw.Graphics.Add(7)
 Dim RotA : RotA = 0
 Dim Rot
 Dim Wid

'# get the reference point of the selected text - so that we know where to place the new text
Dim RefP : Set RefP = gfx.ReferencePoint(True)
Dim x1 ,y1
'# get the letters position before rotation - left side of circle
x1 = RefP.X - R
y1 = RefP.Y
Dim i

 '# initial rotation angle depending on direction see the Radians Function - not included in vbscript
 Dim TR : TR = Radians(90)*(Dir*-1)
 Dim L
 Dim A
'# get the size and font of the selected text
 Dim TH1 : TH1 = gfx.Properties.Item("TextSize").Value
 Dim Font : Font = gfx.Properties.Item("TextFont").Value

'# see the function to get the true text height
 Dim mFactor
 Dim TH : TH = GetTextHeight(Font,TH1,mFactor)
 TH = TH * mFactor

'# loop through the letters in the character array
For i = 0 To UBound(CHarray)

L = CHarray(i)
'# add a new text graphic
  Set g = Group.Graphics.AddText(L,x1,y1,0,TH)
  g.Properties.Item("TextFont").Value = Font
  '# centre middle aligned
  g.Properties.Item("TextFormat").Value = 514
  g.Layer = "0"
  g.Draw

'# Measure the new text graphic
  Dim verts : Set verts = g.Vertices
  verts.UseWorldCS = True
Wid = (verts(3).X - verts(2).X) * SF

'# Rotate the letter 90 or -90 about the Z axis depending on anticlockwise or clockwise
  g.RotateAxis TR,0,0,1,x1,y1,0

'# find the rotation angle for half the current letter
  Rot = (Wid / R)/2
'# add Rotation multiplied by direction to the current total Rotation Angle,
  RotA = RotA + Rot * Dir
'# Rotate the new graphic about the centre of the arc(reference point of selected text)
  g.RotateAxis RotA,0,0,1,RefP.X,RefP.Y,0
'# add the other half of the letters rotation angle to the total rotation angle
  RotA = RotA + Rot * Dir
  g.Draw

Next

 '# We want to Rotate the group of letters so that they are either at the top or the bottom of the circle

 A = (Radians(90) - Abs(RotA)/2)*Dir
 Group.RotateAxis A,0,0,1,RefP.X,RefP.Y,0
 
 '#change the reference point of the group to the centre of the circle
 Dim GRP : Set GRP = Group.ReferencePoint(True)
GRP.X = RefP.X
GRP.Y= RefP.Y
GRP.Z = 0
 '# change the layer of the group to match the layer of the selected text
    Group.Layer = gfx.Layer
 '# Name the group
    Group.Properties.Item("Info").Value = str

'# Add an Undo record for the new group of graphics
 Dim UndoRec : Set UndoRec = TCdraw.AddUndoRecord("Add Curve Text")
 UndoRec.AddGraphic(Group)
 UndoRec.Close
'# refresh the active view
 TcDraw.ActiveView.Refresh

 End Sub
'________________________________________________________________________________
Public Sub ToCharacterArray(ByVal my_string, ByRef NewArray)
  '## separates text into an array of letters

 Dim i
 ReDim NewArray(Len(my_string) - 1)
 For i = 1 To Len(my_string)
    NewArray(i - 1) = Mid(my_string, i, 1)
 Next

 End Sub
'_________________________________________________________________________________
Function GetTextHeight(Font,ByVal Height,ByRef mFactor)
 '# Calculates the text Height of text

If Properties("$TEXTHEIGHTBYMETRICS").Value= false Then
'# text height is set to TextBox Height
GetTextHeight = Height
mFactor = 1
Exit Function
End If

 '# text height is set to "for character above font baseline"
 Dim ascent,decent,tsize,gfx,afact,dfact
 '# Draw text to measure
 Set gfx = TcDraw.Graphics.AddText("Oh",0,0,0,10)
 gfx.Properties.Item("TextFont").Value = Font
 '# top left alignment
 gfx.Properties.Item("TextFormat").Value = 257
 gfx.Draw
 tsize = gfx.Properties.Item("TextSize").Value
 Dim verts : set verts = gfx.vertices
 ascent = verts(1).Y - verts(0).Y
  '# baseline left alignment
 gfx.Properties.Item("TextFormat").Value=1025
 gfx.Draw
  set verts = gfx.vertices
 Decent = verts(0).Y - verts(2).Y
'#calculate what you need to multiply the text Height by to get the same text height
 mFactor = 10/ (tsize - ascent - Decent)
 gfx.Delete
 afact=ascent/tsize
 dfact=decent/tsize
'# the text height value you see in Turbocad (excludes the text box)
 GetTextHeight = Height - afact*Height - dfact*Height

 TcDraw.ActiveView.Refresh
 End Function

'________________________________________________________________________________

Function Radians(Degrees)
 Dim pi
 pi = 3.14159265359
 Radians = Degrees * pi / 180
     
 End Function



'_________________________________________________________________________________
'=====================================================================



Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

knute971

Hi Alvin,

I had success with placing the text on the upper half of the circle by placing a single letter at the upper quadrant, radially copying 14 letters and then changing each letter to make the title.

The lower half address was much easier, since TAC automatically places the text at the bottom of the circle in the proper orientation.
You cannot view this attachment. 
When I tried to follow your video, I could not get my test circle to show in the Selection Palette after rotating it. Not being too familiar with the Selection Palette, how did you get it to show?
You cannot view this attachment.
DC16, TC14, TC17, TC Platinum 2021 & 2022
Dell XPS-8940 - Windows 11 Pro
NVIDIA(R) GeForce RTX(TM) 3060 12GB GDDR6
11th Gen Intel Core i9 11900K
32GB, 16Gx2, DDR4, 2933MHz
3D Printer: Ender 3 V3 SE

Alvin Gregorio

Quote from: knute971 on May 26, 2026, 07:11:32 AMWhen I tried to follow your video, I could not get my test circle to show in the Selection Palette after rotating it. Not being too familiar with the Selection Palette, how did you get it to show?
Hi knute
Can you show us your Selection Info Options window.  It should be the furthest-left icon at the top of the Selection Info palette.
In the attached, I am showing mine.
 (not to imply that my settings are optimal)
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)

Alvin Gregorio

Quote from: nikkipollard on May 26, 2026, 07:03:35 AMI wrote this script
Nice job on that, Nikki.
I Saved it.  For later use if I do some professional 2D drafting.  I hope I remember I have it.
Thanks!
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)

nikkipollard

Quote from: knute971 on May 26, 2026, 07:11:32 AMHi Alvin,

I had success with placing the text on the upper half of the circle by placing a single letter at the upper quadrant, radially copying 14 letters and then changing each letter to make the title.

The lower half address was much easier, since TAC automatically places the text at the bottom of the circle in the proper orientation.
You cannot view this attachment. 
When I tried to follow your video, I could not get my test circle to show in the Selection Palette after rotating it. Not being too familiar with the Selection Palette, how did you get it to show?
You cannot view this attachment.
That is basically what my script does. Just a little faster then placing each letter manually.
For the built in tool use a polyline to draw the arc. Arcs and circles are always anti clockwise even if you draw them in a clockwise direction. When you draw a polyline the text wont be backwards.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Alvin Gregorio

#20
Quote from: nikkipollard on May 26, 2026, 07:45:43 AMFor the built in tool use a polyline to draw the arc. Arcs and circles are always anti clockwise even if you draw them in a clockwise direction. When you draw a polyline the text wont be backwards.
Yeah (knute), We don't have to use the arc or circle graphic that we want displayed as part of the design to be the object we use TAC on.
   And TAC is not associative
(I think it originally was; can't remember).  So deleting the polyline or whatever that we used for the TAC insertion won't alter the TAC insertion.
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)

knute971

Quote from: Alvin Gregorio on May 26, 2026, 07:28:20 AMCan you show us your Selection Info Options window.
I got it!

In the Selection Info Palette Options window I had the first item (Show all entries of the drawing current space) checked.  When I unchecked that option, the circle appeared. 

I went thru that window before and it's not obvious or intuitive to me why that made the change.
Thanks!
DC16, TC14, TC17, TC Platinum 2021 & 2022
Dell XPS-8940 - Windows 11 Pro
NVIDIA(R) GeForce RTX(TM) 3060 12GB GDDR6
11th Gen Intel Core i9 11900K
32GB, 16Gx2, DDR4, 2933MHz
3D Printer: Ender 3 V3 SE

knute971

Alvin,
I finally got your solution to place the TAC to work, but unfortunately, when I tried to extrude the letters to 2 mm (I wanted to try and make a 2 color coaster) the extrusion fails and only results in a box at the first letter - no extruded letters.  I also had specified that the text was scalable and specified the letter thickness, but that did not work also.

When I tried Lawrence's solution of a radial copy, I could extrude all the letters except 1.

End result so far, is I have my coaster outlined, but cannot get a 3D version of the text to slice!

Nikki
I tried to run your macro, but that failed.  I copied the text into the Macro recorder and ran it.  Should I have done something different?
DC16, TC14, TC17, TC Platinum 2021 & 2022
Dell XPS-8940 - Windows 11 Pro
NVIDIA(R) GeForce RTX(TM) 3060 12GB GDDR6
11th Gen Intel Core i9 11900K
32GB, 16Gx2, DDR4, 2933MHz
3D Printer: Ender 3 V3 SE

PCSteel

Quote from: knute971 on May 27, 2026, 08:24:53 PMI tried to run your macro, but that failed.  I copied the text into the Macro recorder and ran it.  Should I have done something different?

It worked on my system. (thanks for that Nikki, it might come in handy one day)
Did you select a single line text prior to running it?
John@PC Steel

Core i7-6700 CPU
16GB Ram
64 Bit
Windows 10 Home
TurboCAD 2015 Pro Platinum 64 bit Build 90.0
TurboCAD 2023 Platinum 64 bit Build 63.3

nikkipollard

#24
Quote from: knute971 on May 27, 2026, 08:24:53 PMNikki
I tried to run your macro, but that failed.  I copied the text into the Macro recorder and ran it.  Should I have done something different?
No I tried to keep it simple
Add normal single line text to your drawing
Select the text and run the macro
A Input box will pop up on the screen
Type 1 or 2 depending on the direction (top of circle is clockwise, bottom is anti clockwise) Press Ok
Fill in the radius Ok
You cannot view this attachment.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

nikkipollard

If you are converting the text to 3d, You might need to increase the spacing factor in my script.
For some reason the shape of 3d text is fatter
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Andy H

Quote from: nikkipollard on May 26, 2026, 07:03:35 AMYears ago when I was learning how the SDK works, I wrote this script.
It runs from the macro recorder.

Really nice work Nikki.  The big problem with Text on curve for me, is not getting it working,  but it can have very poor spacing.

It often looks awful when using small letters (non-caps).  Whereas your method maintains good readable spacing. 

Alvin Gregorio


Quote from: knute971 on May 27, 2026, 08:24:53 PMNikki
I tried to run your macro, but that failed.  I copied the text into the Macro recorder and ran it.  Should I have done something different?
  Likely, you didn't first select an already-inserted Text object. (?)

Note:  We can edit Nikki's script to make the Output 3D.  Since that Output is a Group, we'd have to Explode it once to 3D_Subtract the characters, in unison via Shift-key, from the coaster top.

  (with a more complex edit of the script, we can output a singular 3D object that will Boolean Subtract; but that would require a major editing of the script)

Quote from: knute971 on May 27, 2026, 08:24:53 PMAlvin,
I finally got your solution to place the TAC to work, but unfortunately, when I tried to extrude the letters to 2 mm (I wanted to try and make a 2 color coaster) the extrusion fails and only results in a box at the first letter - no extruded letters.  I also had specified that the text was scalable and specified the letter thickness, but that did not work also.
Try Flexible and Thickness.  That works for me.
So if sitting on the top face of the coaster, a negative-value (-) Thickness during the TAC insertion.
You will have to Explode the TAC to get it to Boolean Subtract from the coaster.  For me, Explode results in individual 3D text character TC_Surface objects; so will need to set them to be Solid if your coaster is Solid, before Subtracting.

__________________
If you still aren't able to achieve any of this, please share your .tcw Drawing file.
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)

nikkipollard

Quote from: Andy H on May 28, 2026, 12:38:29 AM
Quote from: nikkipollard on May 26, 2026, 07:03:35 AMYears ago when I was learning how the SDK works, I wrote this script.
It runs from the macro recorder.

Really nice work Nikki.  The big problem with Text on curve for me, is not getting it working,  but it can have very poor spacing.

It often looks awful when using small letters (non-caps).  Whereas your method maintains good readable spacing. 

Thank You. My Sister Inlaw lives in Maidstone.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

knute971

Nikki

I reran the macro by selecting the text and then pressing run.  I accepted the defaults and the net result is the text is printed but way up in the z direction and not on an arc.  Also, when I try to extrude the resultant text, nothing happens.

https://drive.google.com/file/d/1TRxYWD5l93Dy-jiGXsn5C72rTnOp9STX/view?usp=drive_link
DC16, TC14, TC17, TC Platinum 2021 & 2022
Dell XPS-8940 - Windows 11 Pro
NVIDIA(R) GeForce RTX(TM) 3060 12GB GDDR6
11th Gen Intel Core i9 11900K
32GB, 16Gx2, DDR4, 2933MHz
3D Printer: Ender 3 V3 SE

Alvin Gregorio

#30
Quote from: knute971 on May 28, 2026, 07:38:52 AMI reran the macro by selecting the text and then pressing run.  I accepted the defaults and the net result is the text is printed but way up in the z direction and not on an arc.  Also, when I try to extrude the resultant text, nothing happens.
Yeah, that's all as expected.  And per design.

Per Nikki's script, the center-point of the arc of the resultant text-string Group is "reference point of selected text".
  Just grab the arc-Text after insertion, maybe edit the Reference Point to your preference, and relocate and rotate as wanted.
  Or we can edit the script so that the resultant Reference Point of it is the center-middle of the resultant arc-Text.

As I mentioned a bit ago, the resultant Output is a Group.  TurboCAD won't let us use a Group for an Extrude operation (nor Prism or Loft or similar).  If one wants to Extrude, will need to Explode once first.
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)

Andy H

Quote from: knute971 on May 28, 2026, 07:38:52 AMI reran the macro by selecting the text and then pressing run.  I accepted the defaults and the net result is the text is printed but way up in the z direction and not on an arc.  Also, when I try to extrude the resultant text, nothing happens.

The default radius is 1000. so effectively, it would be drawing 1/4 inch text on an 83 foot (1000 inch) radius arc.  That's a big arc.     

Alvin Gregorio

Quote from: knute971 on May 28, 2026, 07:38:52 AMand not on an arc
I watched your screen-recording, knute.
What you are encountering is not an "issue".
It's simple math/geometry.
Your subject Text is 5/8" tall.  That is 0.625
The text-string is a little over 2" wide.

You accepted the script's default radius of 1000 (space units).
Since the original text string is only X≈2 Y=0.625, and the center-point of that arc-Text copy with a radius of 1000 is at the center-middle of the original Text (per the script's design), yeah, not only is that tiny (relative to 1000) arc-Text Group going to be way out there but also it's going to appear to not be arc'ed— a 2" arc-length of a 1000"-radius (circumference≈6,283"), that itty-bitty arc-Text length is going to appear flat... straight.
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)

knute971

#33
Quote from: Andy H on May 28, 2026, 08:37:01 AMThat's a big arc.
That explains it.
Thanks Andy and Alvin
DC16, TC14, TC17, TC Platinum 2021 & 2022
Dell XPS-8940 - Windows 11 Pro
NVIDIA(R) GeForce RTX(TM) 3060 12GB GDDR6
11th Gen Intel Core i9 11900K
32GB, 16Gx2, DDR4, 2933MHz
3D Printer: Ender 3 V3 SE

Alvin Gregorio

#34
Attached is a revision's of Nikki's excellent and useful Arc'ed_Text script.

This revision:
>changes the Radius default value from 1000 to 100
>adds a note to the user for values: "(value in Drawing Space Units)"
>adds an Input Box for user to select (Text) Mode= Standard, Scalable, Flexible
(Flexible allows 3D/Thickness)
>if "Flexible" Mode is selected, adds an additional Input Box: "Thickness" (3D)
>changes the Color of the individual Text characters within the output Group to "By Block"
>changes the Color of the output Group object to "By Layer"
(one can then select it and change the Color, if wanted)
>changes the resultant Reference Point of the added "Arc Text" to the Center_of_Extents of that object
>changes Undo Record name to "Add Arc Text"
(because it doesn't work for Curve shapes such as splines or beziers)

To execute this, Copy/Paste its contents in TC's MacroRecorder.  Or Open the .tcr file from the MacroRecorder palette (from wherever you downloaded it into).
You must first have a Text object selected before running the script.

In the attachment, delete the .txt after downloading, leaving the extension .tcr

EDIT: Nikki tells me my script omits the spacing factor, which aids in the characters not being jumbled up.  I will try to get to making that fix, and re-post the script.
  Nikki also made a good point to me regarding the output Reference Point.  Leaving it at the middle-center of the source Text and thereby the arc center-point, one can then easily Center-snap it to the center-point of an existing arc or circle, and rotate it.  I will probably change this also.
  Nikki made some other good points and suggestions, which I might implement.
>>Let me know if you are interested in an updated/improved revision of this macro.<<

Option Explicit

'=====================================================================
' RE-WRITES SELECTED TEXT - to follow an arc
' Each character PenColor = -4 (By Block)
' Group PenColor = -3 (By Layer)
'=====================================================================
Dim TcDraw
Dim Gsel

Call Main

Set TcDraw = Nothing
Set Gsel = Nothing

'_______________________________________________________________________________
Sub Main
  Dim gfx, str, CHarray
  Dim DirStr, Dir
  Dim Rstr, R
  Dim ModeStr, Mode
  Dim ThicknessStr, Thickness
  Dim g, Group
  Dim RotA, Rot, Wid
  Dim RefP, x1, y1
  Dim i, TR, L, A
  Dim TH1, Font, mFactor, TH
  Dim verts, GRP, UndoRec

  ' Variables for bounding-box centering
  Dim gChild, childVerts
  Dim minX, minY, maxX, maxY
  Dim firstFound
  Dim j, vx, vy

  Set TcDraw = ActiveDrawing
  Set Gsel = TcDraw.Selection

  If Gsel.Count < 1 Then
    MsgBox "Nothing Selected"
    Exit Sub
  End If

  Set gfx = Gsel(0)

  If gfx.Type <> "TEXT" Then
    MsgBox "Wrong type of graphic selected"
    Exit Sub
  End If

  gfx.Vertices.UseWorldCS = True

  str = CStr(gfx.Properties.Item("Info").Value)

  If Len(str) = 0 Then
    MsgBox "Selected text is empty"
    Exit Sub
  End If

  Call ToCharacterArray(str, CHarray)

  ' get direction from user (validated)
  DirStr = InputBox("Direction" & vbCrLf & "1. Anticlockwise" & vbCrLf & "2. Clockwise", "", 2)
  If DirStr = "" Then Exit Sub
  If Not IsNumeric(DirStr) Then
    MsgBox "Please enter 1 or 2 for Direction."
    Exit Sub
  End If
  Dir = CInt(DirStr)

  ' get radius from user (validated and converted to Double)
  Rstr = InputBox("Radius (value in Drawing Space Units)", "", 100)
  If Rstr = "" Then Exit Sub
  If Not IsNumeric(Rstr) Then
    MsgBox "Please enter a numeric Radius."
    Exit Sub
  End If
  R = Cdbl(Rstr)
  If R = 0 Then Exit Sub

  ' get Mode from user: 1=Standard (default), 2=Scalable, 3=Flexible
  Mode = 1
  ModeStr = InputBox("Mode (optional)" & vbCrLf & "1. Standard (default)" & vbCrLf & "2. Scalable" & vbCrLf & "3. Flexible", "", 1)
  If ModeStr <> "" Then
    If IsNumeric(ModeStr) Then
      Mode = CInt(ModeStr)
      If Mode < 1 Or Mode > 3 Then
        Mode = 1
      End If
    Else
      Mode = 1
    End If
  End If

  ' If Flexible selected, ask for Thickness (optional, default = 1)
  Thickness = 1
  If Mode = 3 Then
    ThicknessStr = InputBox("Thickness (3D) value (value in Drawing Space Units)", "", 1)
    If ThicknessStr <> "" Then
      If IsNumeric(ThicknessStr) Then
        Thickness = Cdbl(ThicknessStr)
      Else
        Thickness = 1
      End If
    End If
  End If

  Select Case Dir
    Case 1
      Dir = 1
    Case 2
      Dir = -1
    Case Else
      Dir = 1
  End Select

  Set Group = TcDraw.Graphics.Add(7)
  RotA = 0

  Set RefP = gfx.ReferencePoint(True)
  x1 = RefP.X - R
  y1 = RefP.Y

  TR = Radians(90) * (Dir * -1)

  TH1 = gfx.Properties.Item("TextSize").Value
  Font = gfx.Properties.Item("TextFont").Value

  TH = GetTextHeight(Font, TH1, mFactor)
  TH = TH * mFactor

  For i = 0 To UBound(CHarray)
    L = CHarray(i)

    Set g = Group.Graphics.AddText(L, x1, y1, 0, TH)

    ' apply TextMode and optional Thickness
    On Error Resume Next
    g.Properties.Item("TextMode").Value = Mode
    If Mode = 3 Then
      g.Properties.Item("Thickness").Value = Thickness
    End If
    On Error GoTo 0

    ' set font and alignment
    g.Properties.Item("TextFont").Value = Font
    g.Properties.Item("TextFormat").Value = 514

    ' set each character color to By Block (PenColor = -4)
    On Error Resume Next
    g.Properties.Item("PenColor").Value = -4
    On Error GoTo 0

    ' set layer to match source text's layer
    g.Layer = gfx.Layer

    g.Draw

    ' measure and rotate
    Set verts = g.Vertices
    verts.UseWorldCS = True
    Wid = verts(3).X - verts(2).X

    g.RotateAxis TR, 0, 0, 1, x1, y1, 0

    Rot = (Wid / R) / 2
    RotA = RotA + Rot * Dir
    g.RotateAxis RotA, 0, 0, 1, RefP.X, RefP.Y, 0
    RotA = RotA + Rot * Dir
    g.Draw
  Next

  A = (Radians(90) - Abs(RotA) / 2) * Dir
  Group.RotateAxis A, 0, 0, 1, RefP.X, RefP.Y, 0

  ' --- Compute group bounding box in world coordinates and set group reference point to middle-center ---
  firstFound = True
  minX = 0: minY = 0: maxX = 0: maxY = 0

  For Each gChild In Group.Graphics
    Set childVerts = gChild.Vertices
    childVerts.UseWorldCS = True

    If childVerts.Count > 0 Then
      For j = 0 To childVerts.Count - 1
        vx = childVerts(j).X
        vy = childVerts(j).Y
        If firstFound Then
          minX = vx: maxX = vx
          minY = vy: maxY = vy
          firstFound = False
        Else
          If vx < minX Then minX = vx
          If vx > maxX Then maxX = vx
          If vy < minY Then minY = vy
          If vy > maxY Then maxY = vy
        End If
      Next
    End If
  Next

  If firstFound Then
    ' fallback: if no child vertices found, use original circle center
    Set GRP = Group.ReferencePoint(True)
    GRP.X = RefP.X
    GRP.Y = RefP.Y
    GRP.Z = 0
  Else
    ' set group reference point to center of bounding box (middle-center)
    Set GRP = Group.ReferencePoint(True)
    GRP.X = (minX + maxX) / 2
    GRP.Y = (minY + maxY) / 2
    GRP.Z = 0
  End If
  ' --- end bounding-box centering ---

  ' Set group's color to By Layer (PenColor = -3)
  On Error Resume Next
  Group.Properties.Item("PenColor").Value = -3
  On Error GoTo 0

  Group.Layer = gfx.Layer
  Group.Properties.Item("Info").Value = str

  Set UndoRec = TcDraw.AddUndoRecord("Add Arc Text")
  UndoRec.AddGraphic(Group)
  UndoRec.Close

  TcDraw.ActiveView.Refresh
End Sub

'________________________________________________________________________________
Public Sub ToCharacterArray(ByVal my_string, ByRef NewArray)
  Dim i, n
  n = Len(my_string)
  If n = 0 Then
    ReDim NewArray(-1)
    Exit Sub
  End If
  ReDim NewArray(n - 1)
  For i = 1 To n
    NewArray(i - 1) = Mid(my_string, i, 1)
  Next
End Sub

'_________________________________________________________________________________
Function GetTextHeight(Font, ByVal Height, ByRef mFactor)
  Dim ascent, descent, tsize, gfx, afact, dfact, verts

  If Properties("$TEXTHEIGHTBYMETRICS").Value = False Then
    GetTextHeight = Height
    mFactor = 1
    Exit Function
  End If

  Set gfx = TcDraw.Graphics.AddText("Oh", 0, 0, 0, 10)
  gfx.Properties.Item("TextFont").Value = Font
  gfx.Properties.Item("TextFormat").Value = 257
  gfx.Draw
  tsize = gfx.Properties.Item("TextSize").Value
  Set verts = gfx.Vertices
  ascent = verts(1).Y - verts(0).Y

  gfx.Properties.Item("TextFormat").Value = 1025
  gfx.Draw
  Set verts = gfx.Vertices
  descent = verts(0).Y - verts(2).Y

  mFactor = 10 / (tsize - ascent - descent)
  gfx.Delete
  afact = ascent / tsize
  dfact = descent / tsize
  GetTextHeight = Height - afact * Height - dfact * Height

  TcDraw.ActiveView.Refresh
End Function

'________________________________________________________________________________

Function Radians(Degrees)
  Dim pi
  pi = 3.14159265359
  Radians = Degrees * pi / 180
End Function

'_________________________________________________________________________________
'=====================================================================
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)

knute971

Alvin,
Nice job!
I was able to enter the text at the top and the bottom of the circle and, with a little manipulation, the text looked like I intended it to.
Now I hope to take it into the slicer and see if I can make a decent 3D coaster from it.
Thanks
You cannot view this attachment.
DC16, TC14, TC17, TC Platinum 2021 & 2022
Dell XPS-8940 - Windows 11 Pro
NVIDIA(R) GeForce RTX(TM) 3060 12GB GDDR6
11th Gen Intel Core i9 11900K
32GB, 16Gx2, DDR4, 2933MHz
3D Printer: Ender 3 V3 SE