Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import Lines with Object Data

Status
Not open for further replies.

TechnicalLoser

Technical User
Nov 19, 2001
26
CA
Hello all,

I am trying to auto import road assesment data into autocad, that was collected in the field. Each road is broken down into segments. Each segment is a record in a spreadsheet, which lists its begining and end coordinates. Each segment also has a rating for its condition. What I would like do do is find a way for Autocad to auto draw each line using the starting and ending coords and attach its rating as object data. If it can't automatically attach object data then placing each line on a seperate layer depending on its rating would be acceptable.

Is there a straight forward way do do this?

Thanks,

TL

 
Not sure what you mean by object data. If you have Express Tools you could attach xdata using the "xdata" command. You could create data in a column to be information formatted to be a script file, or to copy and paste into the command line. For example the following line (or similar) would draw a line and attach xdata:

line_x1,y1,__,xdata_l_ROADCOND_R_rating_

The underscores are actually spaces."roadcond" is any application name you want to use. You can get all this info into one column with a formulaa using "&" or "concatenate". Now with all your segment info lined up, paste into the command line and AutoCAD will create it <if all goes well :) >
 
Sorry I don't have Exprees tools.

Is there any way to run a script that would make the lines automatically and throw them in the appropriate layers?

THanks,

TL
 
You should have it, it comes with AutoCAD (except maybe 2000-2002 versions). I've recently seen a free download but don't have that link handy.

To create separate layers you could again do some manipulating in Excel to create a layer name in a column based on road condition, such as "rc0-99" & "rc100-299", etc. Then again use formulas to get a string all in one column to become the script. Something like:

-layer_m_layername1__line_x1,y1_x2,y2_
-layer_m_layername2__line_x3,y3_x4,y4_
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top