Jump to content

Automated plotting of new circles based on table column


Spinner

Recommended Posts

Hi guys,

 

I'm trying to improve our AutoCAD LT workflow and need some advice on whether this is possible.

 

We typically have to plot two sets of circles on plans:

 

  1. The first set of circles specifies the locations of real-world objects
  2. The second set of circles represent imaginary zones around each of the objects plotted in the first round

 

The radius of each circle (zone) in the second set is determined by a column from a table (currently an Excel file generated from XML), each row of which specifies an ID for each object in the first set and a radius for the surrounding zone. Currently, each zone radius is read off from the table and its circle is created manually. This is where I think improvements could be made.

 

What I would like to do is something like this:

 

  1. Associate (manually) an ID attribute with each circle in the first set
  2. After all circles in the first set have been plotted manually, iterate over each circle, and for each circle:

    1. Retrieve ID attribute from circle
    2. Look up row in table with that ID
    3. Retrieve radius value from that row
    4. With that radius value, plot new circle at the same centre point - this is the zone
    5.  

      For dozens of objects, this could save a lot of time.

       

      Is there any way i could accomplish this, with a script or something?

       

      Thanks,

       

      Spinner

Link to comment
Share on other sites

How are you with excel, do you use VBA or just formulas. It's doable. I use excel to create scripts to insert blocks and drawing geometry as well as change attributes. If the information is in excel to start with there shouldn't be a need to do any manual work, but it depends on circumstances. Can you post a sample drawing and excel file, with just a few examples of data.

Link to comment
Share on other sites

I second what Steven-g is saying so long as you dont have to stop to input something you basicly write a script using excel you can copy a column and paste it onto the command line and watch autocad draw it all. The VBA in excel means you can do some pretty powerfull stuff.

Link to comment
Share on other sites

  • 1 year later...
How are you with excel, do you use VBA or just formulas. It's doable. I use excel to create scripts to insert blocks and drawing geometry as well as change attributes. If the information is in excel to start with there shouldn't be a need to do any manual work, but it depends on circumstances. Can you post a sample drawing and excel file, with just a few examples of data.

 

Hi Steven, thanks for the reply, and my apologies for being so slow to respond.

 

I've attached a sample DWG and Excel spreadsheet. The DWG has six small circles, around which need to be plotted six larger circles with the radii in the Excel file.

 

I haven't associated an ID with each of the small circles because I'm not sure of how to do so. This would be Step 1, as outlined above.

 

Thanks for your help, and I look forward to seeing what you suggest.

 

Spinner

TEST.dwg

Test.xlsx

Link to comment
Share on other sites

1st thing redo your circles as blocks and have an attribute attached it can be invisible it now has a unique identifier, 1,2,3 etc a Dataextract will produce a csv file with centroid and identifier then simply match to your data probably a simple sort and paste between two spread sheets then a simple column calc, circle x,y rad copy to autocad all done.

 

Another way is to put text at the circle centre pt say on another layer use lower left, same thing Dataextract, you will get id and X,Y location

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...