News:

The purpose of these forums is to discuss TurboCAD.  Please keep the discussion of other products to compatibility issues or how the other software can be used with TurboCAD.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Using AI to generate TC Scripts

Started by knute971, July 19, 2025, 08:18:47 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

knute971

I recently watched a YouTube video regarding the use of AI to write CAD scripts and I thought that I would like give it a try.

I used Gemini to write a Turbocad script for a simple beam. The code is shown below.

Following the Gemini instructions, I opened my TC 2022 and copied the script into the text editor.
 
From the script editor, I then saved the script into my Turbocad Script file folder and it saved as Rectangularbeam.gsc.

After opening the Library pallet, I couldn't follow the Gemini instructions which were:

Load into Library:
•   Open the Library palette (if not already open: Tools > Palettes > Library).
•   Navigate to the folder where you saved your RectangularBeam.gsc file.
•   Drag and drop the RectangularBeam.gsc file from your file explorer into the Library palette, or use the "Add File" option within the Library palette.
Insert into Drawing: From the Library palette, drag and drop your RectangularBeam.gsc item into your TurboCAD drawing.

Any help on completing this task?

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 July 19, 2025, 08:18:47 AM...
The code is shown below.
...
saved as Rectangularbeam.gsc...
What file type is .gsc?  It seems to be for gaming script.  One of things with AI is that sometimes we have to help it learn... steer it in the right direction and provide it with the right resources to learn.
  If your are using the Parametric Part Script Editor, it should be Saved as .ppm (default file extension when Saving from withing the PPSE.
Please provide us the text of the code.  Not an image of it.  So that we can Copy/Paste and experiment.

I've recently been doing a similar thing a few times— using my Windows' included MS Copilot.  It learns fast.  I had it read my PPM scripting manual, which I copied/pasted from the User Guide and much-better formatted.  MS Copilot read it all and absorbed its teachings in about 3 seconds.

Copilot's .ppm script(s) have been successful a few times.

It and I worked on this for hours last weekend, I gave up:  Write a Ruby Script that will show step-animation of rotating a line a specified step-degree and quanity of steps.  Like I say... hours of my life (and Copilot's life) spent; no success to show for it.  All iterations of the script looked to be very close.

You can Copy/Paste your script into Notepad and Save as a .txt file and upload that here.
Or you Copy/Paste your script into a Code window, such as I did below:

//Window with Fixed Center Glass and Sliding Panels
Units(1[mm])

//Parameters
width = Parameter("Window Width",1500,LINEAR)
height = Parameter("Window Height",1200,LINEAR)
frame_thickness = Parameter("Frame Thickness",50,LINEAR)
glass_thickness = Parameter("Glass Thickness",5,LINEAR)
sliding_panel_width = Parameter("Sliding Panel Width",350,LINEAR)
layer = Parameter("3D Layer","Windows_3d",TEXT)
frame_material = Parameter("Frame Material","Textures\Metal",TEXT)
glass_material = Parameter("Glass Material","Glass\Glass",TEXT)

//Order the parameters
ABC = (width, height, frame_thickness, glass_thickness, sliding_panel_width, layer, frame_material, glass_material)
Output(ABC)

//Create the outer frame
outer_frame = Rectangle(width, height)
outer_frame_3D = Thickness(outer_frame, frame_thickness)
Frame = SetProperties(outer_frame_3D, "Layer" = layer, "Material" = frame_material)

//Create the fixed center panel
center_width = width - 2 * sliding_panel_width
center_panel_2D = Rectangle(center_width, height - 2 * frame_thickness, -center_width / 2, frame_thickness)
center_panel_3D = Thickness(center_panel_2D, glass_thickness)
FixedPanel = SetProperties(center_panel_3D, "Layer" = layer, "Material" = glass_material)

//Create the left sliding panel
left_panel_2D = Rectangle(sliding_panel_width, height - 2 * frame_thickness, -width / 2 + sliding_panel_width / 2, frame_thickness)
left_panel_3D = Thickness(left_panel_2D, glass_thickness)
SlidingPanelLeft = SetProperties(left_panel_3D, "Layer" = layer, "Material" = glass_material)

//Create the right sliding panel
right_panel_2D = Rectangle(sliding_panel_width, height - 2 * frame_thickness, width / 2 - sliding_panel_width / 2, frame_thickness)
right_panel_3D = Thickness(right_panel_2D, glass_thickness)
SlidingPanelRight = SetProperties(right_panel_3D, "Layer" = layer, "Material" = glass_material)

//Group the components
Window = Group(Frame, FixedPanel, SlidingPanelLeft, SlidingPanelRight)

//Reference point for insertion
reference_point = RefPoint(0, 0, 0)

//Output the window
Output(reference_point, Window)
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

Also— Now that I review your script image, that's not TurboCAD's PPSE .ppm code.  Nikki or someone can probably tell us what Code/language that Gemini is trying to facilitate and write in.

Was your intention to write and use a script for use in TurboCAD's Parametric Part Script Editor, to produce a parametric symbol .ppm ?
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: knute971 on July 19, 2025, 08:18:47 AMI used Gemini to write a Turbocad scrip
If the desire is to produce a TurboCAD PPM script, Have your Gemini read and learn from this PDF.
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 used Google Gemini (not signed into my Google account; interaction would have been more robust if I were signed in, but for a certain reason I didn't want to sign in).
Fed it (copied/pasted contents) my User Guide document.
It learned.
I asked it to "Write a script in the English/Imperial Units system that is for a rectangular beam, with parameters for width (X value), depth (Y value), and height (Z value)."

Below is what it produced, which successfully works in TurboCAD's PPSE:

// RectangularBeam.ppm - Creates a rectangular beam with user-defined dimensions

// Define parameters
X = Parameter("Width", 10, LINEAR, Interval(0.1, 100));     // Width of the beam (X-dimension)
Y = Parameter("Depth", 5, LINEAR, Interval(0.1, 100));     // Depth of the beam (Y-dimension)
Z = Parameter("Height", 20, LINEAR, Interval(0.1, 200));   // Height of the beam (Z-dimension)

// Set units to English/Imperial
UNITS(INCHES);

// Create the rectangular profile
RectProfile = Rectangle(X, Y);

// Extrude the profile to create the beam
Beam = Thickness(RectProfile, Z);

// Output the final beam
Output(Beam);

Once Copied from here, then Pasted into TurboCAD's PPSE, in PPSE Save as a .ppm  Default location or somewhere else you specify.  Then Insert the symbol via the insert arrow ▶ button at the top.
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

It looks like the original code produced was Javascript (going off the fact it used the var assignment).  TC cannot use javascript.

knute971

Quote from: Alvin Gregorio on July 19, 2025, 08:57:49 AMIf your are using the Parametric Part Script Editor, it should be Saved as .ppm (default file extension when Saving from withing the PPSE.

Alvin,

This is the copy of the Gemini script

//========================================================
// SCRIPT: Parametric_Rectangular_Beam
// DESCRIPTION: Draws a 3D rectangular beam with adjustable dimensions.
//========================================================

// --- Define Parameters ---
// These are the values you can change in the Parametric Part Manager
// once the part is loaded into your drawing.

// Width of the rectangle (often corresponds to X-axis)
var Width = NewParam(0.2, "mm", "Width", "The width of the rectangular beam.");

// Height of the rectangle (often corresponds to Z-axis for vertical height)
var Height = NewParam(0.8, "mm", "Height", "The height of the rectangular beam.");

// Length of the rectangle (often corresponds to Y-axis)
var Length = NewParam(50.0, "mm", "Length", "The length of the rectangular beam.");

// --- Geometry Generation ---
// This section uses the defined parameters to create the 3D box.

function Create() {
    // Clear any previous geometry for regeneration
    Clear();

    // Create a 3D Box using the defined parameters
    // Syntax: CreateBox(X_Dimension, Y_Dimension, Z_Dimension);
    // In many CAD contexts:
    // X = Width
    // Y = Length (depth)
    // Z = Height
    CreateBox(Width, Length, Height);

    // If you want to place the box at a specific origin (e.g., centered)
    // you might use Transform commands, but for a simple box,
    // it's usually created with one corner at (0,0,0) or centered based on the tool.
    // CreateBox often creates it with the base centered or at the origin.
    // For this script, it assumes the standard CreateBox behavior.

I copied this into the Script Editor and used the save icon to save it.  It saved as a .gsc.

Typing this as 2 new responses came in, but I will post it anyway
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

Here is the Gemini-generated TC .ppm script for the Rectangular Beam, with the origin (bottom-left) at World coordinate 0,0,0
It took me and Gemini two tries of my requesting and correcting Gemini before Gemini got it correct.

// RectangularBeam.ppm - Creates a rectangular beam with user-defined dimensions, with its bottom-left corner at WCS 0,0,0

// Define geometric parameters
X = Parameter("Width", 10, LINEAR, Interval(0.1, 100));     // Width of the beam (X-dimension)
Y = Parameter("Depth", 5, LINEAR, Interval(0.1, 100));     // Depth of the beam (Y-dimension)
Z = Parameter("Height", 20, LINEAR, Interval(0.1, 200));   // Height of the beam (Z-dimension)

// Set units to English/Imperial (Inches)
Units(1[in]);

// Create the rectangular profile with its bottom-left corner at (0,0).
// The Rectangle function takes width, height, and optional center X, center Y.
// If the bottom-left is (0,0), then its center is (X/2, Y/2).
RectProfile = Rectangle(X, Y, X/2, Y/2);

// Extrude the profile to create the beam.
// Thickness creates the 3D object from the 2D profile.
// Assuming it extrudes from Z=0 upwards, the bottom of the beam will be at Z=0.
Beam = Thickness(RectProfile, Z);

// Output the final beam
Output(Beam);
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

It took me a few attempts (typing back-n-forth) in which I taught Gemini, but eventually Gemini figured out how to provide me an accurate revision of the above script which places the Reference Point of the inserted Parametric Symbol at 0,0,0.  So that when parameters are changed in Selection Info, origin stays at 0,0,0.
The resultant script of my and Gemini's back-n-forth is below:

// Define geometric parameters
X = Parameter("Width", 10, LINEAR, Interval(0.1, 100)); // Width of the beam (X-dimension)
Y = Parameter("Depth", 5, LINEAR, Interval(0.1, 100)); // Depth of the beam (Y-dimension)
Z = Parameter("Height", 20, LINEAR, Interval(0.1, 200)); // Height of the beam (Z-dimension)

// Set units to English/Imperial (Inches)
Units(1[in]);

// Create the rectangular profile with its bottom-left corner at (0,0).
// The Rectangle function takes width, height, and optional center X, center Y.
// If the bottom-left is (0,0), then its center is (X/2, Y/2).
RectProfile = Rectangle(X, Y, X/2, Y/2);

// Extrude the profile to create the beam.
// Thickness creates the 3D object from the 2D profile.
// Assuming it extrudes from Z=0 upwards, the bottom of the beam will be at Z=0.
Beam = Thickness(RectProfile, Z);

// Relocate the Reference Point (insertion point) of the entire part to 0,0,0.
// Since the beam's bottom-left corner is already at 0,0,0, this makes that point the insertion point.
RP=RefPoint(0,0,0);

// Output the final beam
Output(Beam,RP);
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: Andy H on July 19, 2025, 09:33:09 AMIt looks like the original code produced was Javascript (going off the fact it used the var assignment).  TC cannot use javascript.

I pasted your Gemini script into the PPSE and saved it and it worked.

When I redid my original script and saved it, it showed that it was going to save it as a .ppm, but actually saves it with the .gsc extension.  Strange!
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

#10
Quote from: knute971 on July 19, 2025, 01:31:57 PMWhen I redid my original script and saved it, it showed that it was going to save it as a .ppm, but actually saves it with the .gsc extension.  Strange!
That file name, including file-type extension, is probably "RectangularBeam.gsc.ppm"

You don't have File Extensions set to show in your File Explorer.  If you check that file's Properties, you will probably find the Name to be "RectangularBeam.gsc.ppm".

So it is saved as .ppm file.  But because it's not written anywhere nearly accurately for TC PPM scripting, it doesn't work.
___
Also:  It appears you have an incorrect File Type association for .ppm files.  You have the Gimp application as the default "Open files of type with...".
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

Actually, both your script AG Rectangular Beam and my script KN Rectangular Beam show the same file type - GIMP 2.20.38 PPM (.ppm)

But, anyway, I wanted to see if AI could create a strip and with your help and guide, I can now see another advantage to AI.

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

Alvin Gregorio

#12
Quote from: knute971 on July 19, 2025, 03:42:28 PMActually, both your script AG Rectangular Beam and my script KN Rectangular Beam show the same file type - GIMP 2.20.38 PPM (.ppm)
I like things neat & tidy and right, is all.  If you can live with Gimp being the Default app for .ppm file types, I reckon that's okay.
  I would think we would want the Default App that opens the .ppm file (type) extension to be Notepad, Notepad++, or SoftDev's Symbol Designer.


Quote from: knute971 on July 19, 2025, 03:42:28 PMI wanted to see if AI could create a strip and with your help and guide, I can now see another advantage to AI.
Did you feed your AI my formatted version of the TurboCAD User Guide's Parametric Part Script Editing section?  To learn from (in about a second's time).
I have found with AI oftentimes we have to teach it; and/or feed it the information to learn from.

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 find it interesting that Gemini, in my playing with it, took it upon itself to add so many comments explaining its script.
______________________
I should have told Gemini what I wanted the default parameter values to be— such as 144, 3.5, and 11.5, for an American 4x12 that is 12' long.
So that would be the initial insertion of the Parametric Symbol, unless/until we change the Parameters in Selection Info.
That just looks more like a "beam", when initially inserted in 3D view.
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

I have been using Gemini to learn Blender's geometry nodes - (as well as a lot of tutorials)
It works well, But I think that is because there are a lot of examples and instructions on the web.
There isn't much out there when it comes to Turbocad scripting. Even the help documents are vague.

To steer Gemini in the correct direction you can be more specific by telling it how you want to script, for TC.

There are multiple ways to write scripts for Turbocad.

The simplest is to write a Parametric symbol, using Turbocad's own language in the Parametric part script editor
palette. It is a simple language with limitations, but you don't need any programming skills to write these scripts. The result is similar to a dynamic block in Autocad. (A bit more powerful because they can be 3d symbols, and you aren't limited to one visual style)
The files are saved into your library file and have a .ppm extension.

The Ruby console. Turbocad uses iron Ruby
- I gave up on this because there is no help, and Ruby doesn't seem to guess what Turbocad's objects are as well as Visual basic does.  Maybe Gemini will be able to help. I think the file extension is .rb

You can write scripts in the macro recorder. The macro recorder uses vbscript as its programming language. There is a lot of help on the internet, for vbscript. You can always record a macro to see how the turbocad API is structured. Vbscript does guess what Turbocad's objects are so there are a few things you can't do with the macro recorder but on the whole it makes better guesses then Rubi, it is very useful. The extension is .vbs or .tcr (the macro recorder saves as .tcr)

The old Turbocad API uses dot.com objects so you can use any programming languages that will work with them.







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

nikkipollard

Knute I just tested Gemini, on a ppm script it seems to be getting confused with Autocads API.
And returning Visual basic Language.
It might be better if you read through the PPM part of the forum.
Ask questions, someone will answer. I have a whole library of working symbols, and script files that work with the Turbocad API
I am happy to help where I can.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

knute971

Thanks Nikki and Alvin.

I am a fan of AI (and this forum) and I have used it to write a complaint letter, create a court motion, revise my Will, enhance old photos and, in general, tutor me in new activities like 3D printing.  I especially love the fact that one can conduct a continuing dialog on a subject just like you would be talking to a person and asking related questions.

This current dialog has exposed me to a new feature of AI and I intend to find a use for it in the future.

Thanks again.
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

#17
Be prepared to teach your AI.  And feed it good instructional information.

It helps to be proficient in TurboCAD and/or Symbol_Designer .ppm scripting.  Until the (AI) student becomes the teacher.  I'd be curious about the results if Nikki or Torfinn decided to teach an AI to create .ppm scripts.
(I'm only proficient and knowledgeable enough that I can guide AI past their fundamental mistakes).
  I'm currently working on feeding AI not only my formatted version of this PPM Scripting TC User Guide section, but also Symbol_Designer's Help Reference.
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

I wonder if anyone has tried doing this with TC's Co-pilot Pro (If anyone bought it, or is a beta tester). Co-pilot help probably wouldn't be of any use as its a 'dumb' AI.  But Co-pilot pro is supposed to do a lot more. 

Dean

Quote from: Andy H on July 21, 2025, 05:38:08 AMI wonder if anyone has tried doing this with TC's Co-pilot Pro (If anyone bought it, or is a beta tester). Co-pilot help probably wouldn't be of any use as its a 'dumb' AI.  But Co-pilot pro is supposed to do a lot more. 

TurboCad's CoPilot Pro produced a working ppm script when I asked a question similar to Alvin's for creating a rectangular beam.You cannot view this attachment.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Andy H

Thanks for checking Dean.  And many thanks for showing me the type of question to ask co-pilot. (I had no idea of the type of questions to ask).  As a test, I copied your question into co-pilot help, and I was surprised to see it produced similar results to your example. and it worked.


nikkipollard

Quote from: Alvin Gregorio on July 20, 2025, 07:28:09 AMBe prepared to teach your AI.  And feed it good instructional information.

It helps to be proficient in TurboCAD and/or Symbol_Designer .ppm scripting.  Until the (AI) student becomes the teacher.  I'd be curious about the results if Nikki or Torfinn decided to teach an AI to create .ppm scripts.
(I'm only proficient and knowledgeable enough that I can guide AI past their fundamental mistakes).
  I'm currently working on feeding AI not only my formatted version of this PPM Scripting TC User Guide section, but also Symbol_Designer's Help Reference.
If you are teaching AI, will that benefit me? Because when I ask questions about TC, I get scripts for Autocad in VBA. Even though I specifically asked for Turbocad scripts. I was wondering if it searched my computer and found an Autocad clone on this machine and decided that I meant Autocad.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Alvin Gregorio

Shoot, Nikki...  If you feed it all your complex scripts, and say "like this", and have it read the PPSE section of the User Guide and tell it to stick to that format and syntax, it ought to produce pretty good TC .ppm scripts.
  You might have to reprimand it a couple of times and bring it back on track.
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: Andy H on July 21, 2025, 02:19:18 PMThanks for checking Dean.  And many thanks for showing me the type of question to ask co-pilot. (I had no idea of the type of questions to ask).  As a test, I copied your question into co-pilot help, and I was surprised to see it produced similar results to your example. and it worked.


I have been using Copilot exhaustively since I got my 3D printer and I find it to be extremely helpful. So I also tried to enter Dean's query without uploading AG's Guide and got the following:

 You cannot view this attachment.

I entered the script into PPSE manager and then saved it.  When I tried to add it to the library, it would not load.

So, is the failure because it is not in the right format or am I doing something wrong?  The Copilot's response seems to indicate that it is aware of TC's PPSE.
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

nikkipollard

Quote from: Alvin Gregorio on July 22, 2025, 12:50:35 AMShoot, Nikki...  If you feed it all your complex scripts, and say "like this", and have it read the PPSE section of the User Guide and tell it to stick to that format and syntax, it ought to produce pretty good TC .ppm scripts.
  You might have to reprimand it a couple of times and bring it back on track.
I guess I was thinking more in terms of people who have no experience with scripting. Who genuinely want to learn from AI. At the moment there is not enough documentation for Turbocad. So it is returning nonsense, that wont work in TC. But you have taught it. So surely it should use what you taught it to teach me.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Andy H

Quote from: knute971 on July 22, 2025, 05:56:45 AMI have been using Copilot exhaustively since I got my 3D printer and I find it to be extremely helpful. So I also tried to enter Dean's query without uploading AG's Guide and got the following:

I entered the script into PPSE manager and then saved it.  When I tried to add it to the library, it would not load.
So, is the failure because it is not in the right format or am I doing something wrong?  The Copilot's response seems to indicate that it is aware of TC's PPSE.

The script it produced for yourself is completely different to the one it produced for me.  And as I was just testing things, I didn't bother saving the co-pilot results.

Unfortunately TC's co-pilot help has now stopped working. Keeps giving me a 'timeout was reached', even for the very simplest of questions.  This suggests to me that TC'c co-pilot help is good when one is lucky enough to get it working.   But it is badly implemented to be a reliable source of help.  (it only worked for a day and a half, then it broke).

Andy H

Hmm.  Just to add to my post above. As I was a bit negative and annoyed of its failure.  Like I say, when its working co-pilot help is not bad.  yesterday I asked it ''how to write a script to create a TurboCAD ppm I-beam'' (cannot remember the exact words I used).

The result and ppm only had two errors, which were simple to correct, even for me who knows virtually nothing about ppm scripts.  After it failed to produce a part, I noticed it had forgotten to // out a comment, and then it produced an open profile, as it forgot to close the polyline. once I'd corrected these two, the ppm produced a solid I-beam just fine.

So it can be used to good effect, for help with TC, its just appears temperamental.

Tim Olson

I have done a lot of work regarding training Copilot for TurboCAD.

AI is very much about training on private data.

I would very much like to improve Copilot's ability to generate PPM's. 

To update Copilot on PPM, we need training data in the following format:

Question: example question
Response: example PPM example

A lot of AI is about annotating and labeling private data.  If you can provide me data in this format, I can include in the TurboCAD AI training data.  Send the data to:

https://masterviacad.com/bugs/page5.php

And I will include into the next version of TurboCAD 2025 Windows training data.

Thanks so much to those who participate!

Tim














Tim

nikkipollard

Thanks Tim. That would be great.
The problem with, most of us, who write ppms - is that we are not programmers so our solutions aren't always the best programming solution.
It would be nice if you could model something in Turbocad and ask AI to generate a script from that model, using part tree information, or constraints.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Alvin Gregorio

Quote from: Tim Olson on July 30, 2025, 09:11:17 PMAnd I will include into the next version of TurboCAD 2025 Windows training data.

Tim
What does that mean?

=========
My concern-- and hesitancy-- is we Users put in effort to build something that IMSI then turns around and charges us for using (what we helped build)

-Alvin
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)

Tim Olson

#30
The PPM features of TurboCAD are a pretty interesting tool for creating scripted parts. With that in mind, we are exploring enhancing Copilot to support a text to PPM Agent. This Agent will have access to documentation and confirmed example .ppm files to assist you in creating new custom PPMs.

The PPM Agent is very dependent on example training data.  So I've created an open source GitHub repository of TurboCAD PPM training data for those interested in participating. Data at this site will be "Live" to the agent on confirmation.

https://github.com/tim-olson/PPM
You cannot view this attachment.
 You cannot view this attachment.

If you are interested in participating in this activity, drop me an email at tolson@imsidesign.com

I've also created a very primitive AI agent using OpenAI.  The training data is very limited but it might be useful to those experienced with PPM.

https://chatgpt.com/g/g-68a6502647ec8191b6eaa67f50bfd5e4-turbocad-ppm

 

Tim

AussieBloke

Anything to do with AI and Im in, thanks Tim