AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Link an Entity to chosen Excel column data

4 REPLIES 4
Reply
Message 1 of 5
brian_shick
377 Views, 4 Replies

Link an Entity to chosen Excel column data

Hi, I have no experience linking AutoCAD to Excel files and wanted to know if it is possible to link a PLINE to Excel data, specifically to a row and just a few columns from that excel file.  The request I have is to be able to click on a PLINE segment and popup a box with only the relevant linked data from an excel file. I have attached a sample DWG and snap shots from the Excel file they are wanting to see.

Any help or suggestions would be greatly apricated.

4 REPLIES 4
Message 2 of 5
ChicagoLooper
in reply to: brian_shick

Linking only ‘certain columns’ is not an efficient way to link data from a spreadsheet. Keep an open-mind, abandon all preconceived ideas of what you think you’re accomplishing and think about it. Really think about. You’ll no longer be ‘linking’ a Table. Instead, you’ll be linking individual cells and that’s equivalent to linking individual pieces of data. 

If you want to link data like that, you be more successful (and more AutoCAD professionalistic-ish) if you create an object data table in Map3D. Then attach that table to your object(s) and enter your data into each object’s table. It’ll be as simple as filling in the blanks. 

Once the data is in each object’s data table (so far it looks like you only have one object so you’ll only have one table) you’re good to go. The attached data is not only viewed

in the Properties Palette (no special software or skills needed to ‘view’ the data) but it’s editable too. Just click the data in the Prop Palette and over write the current data or fill in data that you forgot to enter in the first place. 

The attached data, also known as OD (obj data) makes your line ‘smart’ (think smart phone vs dumb phone, as in one phone can give you verbal driving directions and the other cannot).

 

If you have a lot if smart objects you can, with know-how, run queries. Running queries allows you to manage the data and when you manage the data you manage the AutoCAD objects 

Chicagolooper
Message 3 of 5
O_Eckmann
in reply to: brian_shick

Hi @brian_shick ,

 

Some more questions to identify best solution :

- your data are static? updated? how often?

- your data are shown only in AutoCAD? outside of AutoCAD?

- do you want to modify your excel data from AutoCAD or only outside of AutoCAD?

- Excel is a constraint? or you could transfer your data in a more useful SGBD (Access or SQLite for example)?

 

Olivier

Olivier Eckmann

EESignature

Message 4 of 5
brian_shick
in reply to: O_Eckmann

Here is what I am being told:

- your data are static? updated? how often? Yes, monthly

- your data are shown only in AutoCAD? outside of AutoCAD? I think in AutoCAD, viewable like in a properties window

- do you want to modify your excel data from AutoCAD or only outside of AutoCAD? Only edit in Excel master file and reference to the drawing.

 

Is there a way to connect the HANDLE of the entity to a row in excel and have that show in a properties type palette in ACAD?

Message 5 of 5
O_Eckmann
in reply to: brian_shick

Hi @brian_shick ,

 

If you want to link Excel to AutoCAD you must have Excel (MS Ofice) installed in 64bit version. In this case you can make a DB connexion via ODBC, and you can link a row to an CAD Object. Only one object per link, not a portion of polyline could be linked to a record.

 

Because I've only 32 bit version of Office, I try another solution with ObjectData. In my screencast, I :

- ADEDEFDATA to create a table with information I want to display

- ADEATTACHDATA to add 1 table on each object

- fill ID field with data I could link as Key in my excel file

- use my plugin to export ID and all empty field (TXT file)

- open Excel file and TXT file

- use JOIN function to fill OD sheet

- save in XLSX file, and saveas TXT file to created a new filled TXT file

- use plug-in to import OD data to my object

 

If I update XLSX file, linked sheet is also update and you export new TXT file, you can use ODIN again to update CAD object.

 

It isn't automatic, but if it must be done only once per month when your Excel data are updated, it's not to long.

 

 
Olivier

Olivier Eckmann

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report