Map 3D OD to Autocad DWG

Map 3D OD to Autocad DWG

Anonymous
Not applicable
2,742 Views
9 Replies
Message 1 of 10

Map 3D OD to Autocad DWG

Anonymous
Not applicable

As i have highlighted in attached screenshot, can someone please tell me how I can show this OD in my normal AutoCad DWG?

0 Likes
2,743 Views
9 Replies
Replies (9)
Message 2 of 10

ChicagoLooper
Mentor
Mentor

Contrary to what you've been told, heard or have read, you cannot show ‘object data’ in Plain Vanilla AutoCAD. Plain vanilla AutoCad doesn't understand OD. 

Your normal AutoCad will ignore that OD. 

Chicagolooper

EESignature

Message 3 of 10

АлексЮстасу
Advisor
Advisor

If I install Civil 3D Object enabler on AutoCAD, will ODs be available in it?

For example: https://knowledge.autodesk.com/support/autocad/downloads/caas/downloads/content/autodesk-civil-3d-20...

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 4 of 10

TerryDotson
Mentor
Mentor

Object Data is limited to Map3D and Civil3D.  No other application can access this data, no other DWG compatible can read this data (not even Autodesk products) to my knowledge.  Which begs the question, why would anyone want to store their data this way?

 

For the potential answer of "so it's inside the drawing" the response is that between xdata and xrecords, their are other ways to store it in the drawing that can be accessed by plain AutoCAD and other DWG readers,  Perhaps because nobody has ever provided a clean user interface to do it <yet> that is available for all.

 

 

Message 5 of 10

ChicagoLooper
Mentor
Mentor

@АлексЮстасу wrote:

If I install Civil 3D Object enabler on AutoCAD, will ODs be available in it?

 


No. This type of object data is not considered a Civil3D entity so the Civil3D object enabler will not help if you want to display Map3D's OD.

Chicagolooper

EESignature

Message 6 of 10

АлексЮстасу
Advisor
Advisor

I can 't test the Enabler AutoCAD now, but Map 3D features are included in Civil?

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

0 Likes
Message 7 of 10

АлексЮстасу
Advisor
Advisor

Users of new AutoCAD can install vertical applications free of charge, including Map 3D.

 

@TerryDotson wrote:

Object Data is limited to Map3D and Civil3D.  No other application can access this data, no other DWG compatible can read this data (not even Autodesk products) to my knowledge.  Which begs the question, why would anyone want to store their data this way?

 

For the potential answer of "so it's inside the drawing" the response is that between xdata and xrecords, their are other ways to store it in the drawing that can be accessed by plain AutoCAD and other DWG readers,  Perhaps because nobody has ever provided a clean user interface to do it <yet> that is available for all.


Yes, Autodesk for an obscure reason did not give for xdata, for xrecords "a clean user interface."
For an unknown reason, Autodesk gave OD in Map 3D, for Property Sets in Civil, Architecture, MEP clearly few tools for use.
And Autodesk gave no converters for xdata, xrecord, OD, Property Sets.
Autodesk not want all users of all AutoCAD to be able to share attribute data?

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

0 Likes
Message 8 of 10

CADaSchtroumpf
Advisor
Advisor

Hello,
You can try this in a classic autocad after using mapexport: READ_XD.
However you can also use in map (and only in map) instead of mapexport first this: OD2XD.
It has the advantage if you have several tables to make a better presentation of the xdata.
Your file keeps the OD but also has the xdata readable by a basic Autocad (but full, not LT)

(defun c:read_XD ( / AcDoc Space nw_obj ent_text dxf_ent ncol strcatlst Input obj_sel ename elist xd_list fldnamelist strcatlst)
	(setq
		AcDoc (vla-get-ActiveDocument (vlax-get-acad-object))
		Space
		(if (= 1 (getvar "CVPORT"))
			(vla-get-PaperSpace AcDoc)
			(vla-get-ModelSpace AcDoc)
		)
		nw_obj
		(vla-addMtext Space
			(vlax-3d-point (trans (getvar "VIEWCTR") 1 0))
			0.0
			""
		)
	)
	(mapcar
		'(lambda (pr val)
			(vlax-put nw_obj pr val)
		)
		(list 'AttachmentPoint 'Height 'DrawingDirection 'StyleName 'Layer 'Rotation 'BackgroundFill 'Color)
		(list 1 (/ (getvar "VIEWSIZE") 100.0) 5 (getvar "TEXTSTYLE") (getvar "CLAYER") 0.0 -1 250)
	)
	(setq
		ent_text (entlast)
		dxf_ent (entget ent_text)
		dxf_ent (subst (cons 90 1) (assoc 90 dxf_ent) dxf_ent)
		dxf_ent (subst (cons 63 255) (assoc 63 dxf_ent) dxf_ent)
		ncol 0
		strcatlst ""
	)
	(entmod dxf_ent)
	(while (and (setq Input (grread T 4 2)) (= (car Input) 5))
		(cond
			((setq obj_sel (nentselp (cadr Input)))
				(if (eq (type (car (last obj_sel))) 'ENAME)
					(setq ename (car (last obj_sel)))
					(setq ename (car obj_sel))
				)
				(if (eq (cdr (assoc 0 (entget ename))) "VERTEX") (setq ename (cdr (assoc 330 (entget ename)))))
				(setq
					elist (entget ename (list "*"))
					xd_list (cdr (assoc -3 elist))
					fldnamelist (mapcar 'car xd_list)
					ncol 0
					strcatlst ""
				)
				(cond
					(fldnamelist
						(foreach tbl fldnamelist
							(setq ncol (1+ ncol))
							(foreach f (mapcar 'cdr (cdr (assoc tbl xd_list)))
								(setq
									value
									(cond
										((eq (type f) 'STR) f)
										((eq (type f) 'INT) (itoa f))
										((eq (type f) 'REAL) (rtos f 2 2))
										(T "")
									)
									strcatlst
									(strcat
										strcatlst
										"{\\C" (itoa ncol) ";" tbl "} : "
										value
										"\n"
									)
								)
							)
							(mapcar 
								'(lambda (pr val)
									(vlax-put nw_obj pr val)
								)
								(list 'InsertionPoint 'AttachmentPoint 'Height 'DrawingDirection 'StyleName 'Layer 'Rotation 'TextString)
								(list (trans (cadr Input) 1 0) 1 (/ (getvar "VIEWSIZE") 100.0) 5 (getvar "TEXTSTYLE") (getvar "CLAYER") 0.0 (strcat "{\\fArial;" strcatlst "}" )) ;"TechnicBold"
							)
						)
					)
				)
			)
		)
	)
	(vla-Delete nw_obj)
	(prin1)
)
(defun C:OD2XD ( / LstTable Jeu I iNbJeu Elt EltLstTable iEltLst iNbEltLst EltTable oTableDef sNomTable exdata oLstChamp iChamp
                  iNbChamp nb_rcrds sNomChamp sTypeChamp sValChamp lst_tranfert newent)
	(setq LstTable (ade_odtablelist))
	(setq Jeu (ssget))
	(setq I 0 iNbJeu (sslength JEU))
	(repeat iNbJeu
		(setq Elt (ssname Jeu I))
		(setq I (1+ I))
		(if (setq EltLstTable (ade_odgettables Elt))
			(progn
				(setq iEltLst 0 iNbEltLst (length EltLstTable))
				(repeat iNbEltLst
					(setq EltTable (nth iEltLst EltLstTable))
					(setq iEltLst (1+ iEltLst))
					(setq oTableDef (ade_odtabledefn EltTable))
					(setq sNomTable (cdr (assoc "Tablename" oTableDef)))
					(regapp sNomTable)
					(setq oLstChamp (cdr (assoc "Columns" oTableDef)))
					(setq nb_rcrds (ade_odrecordqty Elt EltTable) lst_tranfert (list sNomTable))
					(repeat nb_rcrds
						(setq iChamp 0 iNbChamp (length oLstChamp))
						(setq nb_rcrds (1- nb_rcrds))
						(repeat iNbChamp
							(setq lst_tranfert
								(cons
									(list
										(cdr (assoc "ColName" (nth iChamp oLstChamp)))
										(cdr (assoc "ColType" (nth iChamp oLstChamp)))
										(ade_odgetfield Elt EltTable (cdr (assoc "ColName" (nth iChamp oLstChamp))) nb_rcrds)
									)
									lst_tranfert
								)
							)
							(setq iChamp (1+ iChamp))
						)
					)
					(setq exdata
						(cons (car (reverse lst_tranfert))
							(mapcar
								'(lambda (x / )
									(cond
										((eq (cadr x) "Real") (cons 1040 (caddr x)))
										((eq (cadr x) "Integer") (cons 1070 (caddr x)))
										((eq (cadr x) "Point") (cons 1010 (caddr x)))
										((eq (cadr x) "Character") (cons 1000 (caddr x)))
									)
								)
								(cdr (reverse lst_tranfert))
							)
						)
					)
					(setq exdata (list (list -3 exdata)))
					(setq newent (append (entget Elt) exdata))
					(entmod newent)
				)
			)
		)
	)
	(prin1)
)
Message 9 of 10

O_Eckmann
Mentor
Mentor

Hi,

 

You can publish OD from MAP to DWF, if it's only to view data in Design review or attach as Overlay in AutoCAD.

 

Olivier

Olivier Eckmann

EESignature

0 Likes
Message 10 of 10

ChicagoLooper
Mentor
Mentor

As an alternative to using Vanilla AutoCad to view your Object Data, you can use Google Earth Pro (not Google Maps that you open in your browser, that's not the same as Google Earth Pro). 

 

Try this:

  1. Use MAPEXPORT command and export your lines to ESRI shapefile. If you want to export points and polygons along with your lines, then you'll need to export another shapefile for the points and another for the  polygons. Each vector type will have to be exported separately. (A) SELECTION tab=>select your lines. (B) On DATA tab=>Select Attributes=>Check All Boxes for Object Data so your Object Data will populate the shapefile's database file or dbf. (C) On OPTIONS tab=>Convert coordnates to=>LL84. (D) OK to Exit.
  2. Next, open Google Earth Pro and go to File=>Import=>Browse to and select your shapefile=>OPEN
  3. While still in GE Pro, scroll to bottom of Places Section in the left panel and put a check mark on your shapefile.
  4. With your cursor, select a line in the map and a pop-up will appear will display your object data.
  5. Right click your shapefile and perform SAVE AS and save shapefile to kml.

 

export-data-attributes-objdata.PNG

 

20-options.png

 

Import-Shapefile-to GE Pro.PNG

 

 

Chicagolooper

EESignature

0 Likes