Hi,
I've found a number of resources detailing how to draw circles or squares (or other predefined shapes) at various locations with a script but would like to draw a different shape (say, a dog) that I've created.
Basically, I've made a series of custom shapes and would like to supply a list of center point coordinates and have the software draw them there. Is this possible/easy? Or would I be better off drawing the things in another program then importing them as a vector graphic?
Cheers,
Ben
Solved! Go to Solution.
Solved by steven-g. Go to Solution.
From the sound of your description I would say that turning your shapes into blocks would be the best method, you can define the center point as the blocks base point and a block can be scaled and rotated easily, as well. Though a script would be possible it makes no logical sense. Unless there are other reasons for wanting to use a script
"Blocks" sound like a great way to do this. I have to admit my ignorance here, which is why I didn't suggest blocks to start with.
Rephrased: Is it relatively simple to programmatically draw ~500 blocks by providing a list of center points?
Iit's fairly straightforward in excel, if you use columns A and B to populate your x,y coordinates then use column C with 2 simple formulas, shown in the image
cell C1 starts the insert command using the name of a block that is already defined in your drawing with the correct center point
cell C2 has the formula to give the coordinates and this is copied down for as often as you need
I have used column D just to show where you have to use a space in the formula indicated with "°" because some places you have to use a single space and others require a double space.
Select the indicated cells and press Ctrl+c (copy) then in autocad make sure the command line is active click on it twice and then press Ctl+v (paste)
Be aware that zoom level and other objects in the drawing can influence how this works
Feel free to post back if you continue to run into any issues or need additional help.
Can't find what you're looking for? Ask the community or share your knowledge.