AutoCAD is a computer-aided design (CAD) program used for 2-D and 3-D design and drafting developed by Autodesk .
This topic is to help anyone looking for a solution to this problem. After searching, I found an easy way to transfer what was drawn on the board to the AutoCAD program without exporting a dwg or dxf file.
Due to the difficulty of exporting these files on app inventor .
My solution is :
-
Recording the coordinates of each element drawn on the canvas and saving it in a list, which can be included in the tinnydb database.
-
Save these coordinates as a text file with the scr extension
.scr
Script (SCR) files are used to automate repetitive tasks by executing commands and command options in a specific sequence in AutoCAD .
Script files are ASCII text files with the file extension .scr and can be edited using a simple text editor such as NotePad on Windows or TextEdit on Mac OS
Provided that the AutoCAD commands to be drawn are placed before each coordinate or dimensions
Example of a polyline drawing
_Polyline
x1,y1
x2,y2
x3,y3
x4,y4
space or\n to end the command
With this, a series of sequential commands can be created (lines - circles - dimensions... or any drawing command available on AutoCAD).
Orders can be terminated by <return>
to end the file orders
Some people may need to make the coordinate sign on the y axis negative ( Y * -1 ) so that the drawings on AutoCAD do not appear upside down, due to the difference in the coordinate signs between Canvas and AutoCAD.
x1,-y1
x2,-y2
x3,-y3
x4,-y4
-
Save the file with scr extension
-
After saving the file from the application, you can drag and drop it into the drawing project in the AutoCAD program to be drawn automatically.
_Zoom Z : Zoom extents command to zoom the Polylines drawn inside the file
The link below contains how to create SCR files using Notepad Text _ From Autodesk
https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-BE44AE86-7638-48C9-BE5B-C1DF8E4C8808