Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
805 views
in Technique[技术] by (71.8m points)

shapefile - AutoCad C3D - Trying to Automate MAPEXPORT to include Attribute Data from data table

I have 3 drawings, each with 50+ layers. The client wants me to export each individual layer as an individual SHP file, and needs me to run the export every couple of months. I can write up a script file specifying each layer etc, the catch is that I also need to export the Attribute Data from the attached data tables for each item. I cannot seem to get a hook into the Attribute Data using the MAPEXPORT command in a script, e,g:

-mapexport" "SHP" "c:\Temp\MyLayer1.shp" "Y" "c:\Temp\Street.epf" "S" "L" "All" "MYLAYER1" "*" "No" "Proceed"
-mapexport" "SHP" "c:\Temp\MyLayer2.shp" "Y" "c:\Temp\Street.epf" "S" "L" "All" "MYLAYER2" "*" "No" "Proceed"

This will export my layers, but minus the Attribute Data from the attribute table.

Does anyone have experience in doing this kind of export to SHP? Is it possible to script, or code so that the shapefile contains the Attribute Data?

I tried something along the lines of:

-mapexport" "SHP" "c:\Temp\MyLayer2.shp" "Y" "c:\Temp\Street.epf" "S" "L" "All" "MYLAYER2" "*" "No" "D" "MyDataTable" "Proceed"

But this was just a stab in the dark, I cannot find any documentation outlining the datatable in the command line use of MAPEXPORT.

Note: I can export the shapefile manually and select the data table and it exports as I need it to (by selecting the Data tab in the export dialogue).

I have very limited knowledge of Lisp.

I hope I have explained my issue well enough. Thanks for any help.

question from:https://stackoverflow.com/questions/65878982/autocad-c3d-trying-to-automate-mapexport-to-include-attribute-data-from-data-t

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...