'How to add a point to an AutoCAD drawing using the command line
I work in the field of GIS and I am working with contours, point heights and other datasets which have elevation related information.
In a GIS software (for example QGIS), I can extract the geometry attributes of a line, polygon or a set of points. Consequently, I can also write the set of points and their geometrical attributes to a text file through Python scripting.
There a person who does not use QGIS and is specifically unaware of GIS based techniques. Consequently, the files that I generate using QGIS are completely useless to him. Further, he also works on a Mac OS based computer and therefore the GIS based Autocad is also not available with him.
Therefore, the question how can I provide a set of points with their coordinates, or a polygon with points to AutoCAD via a command line. For example, do we have a command or set of commands like
SET ORIGIN TO 50000,5000
ADD POINT 51000, 51000
...
Solution 1:[1]
In AutoCAD he may use command SCRIPT.
You crerate .scr text file.
Example file with coordinates You can find here
Solution 2:[2]
Just asking the question helped...pretty sure the answer is to use ConstraintLayout.
Solution 3:[3]
Use ConstraintLayout and use the design tab instead of writing the code yourself when using the ConstraintLayout, its pretty easy to achieve what you want. Dont use RelativeLayout or LinearLayout for this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | CAD Developer |
| Solution 2 | RabidMutant |
| Solution 3 |
