Jump to content

AutoFill in Object Data from a 3d Line in AutoCAD MAP 2013


Ssewell

Recommended Posts

Hi all,

 

Need to get this sorted as soon as possible. It is beyond me im afraid :o.

I use AutoCAD Map 2013 - attached is a sample dwg and a picture of what i require. Each line represents where the data needs to go.

Also explained here:

 

Basically i have object data attached to a 3d line for a drainage pipe.

In the properties-Geometry of Autocad it has the Start X, Start Y, Start Z, End X. End Y,End Z of the line and all i require is each to automatically fill out my Object Data table - OD:Pipe

Start X = DS_Pipe_E

Start Y = DS_Pipe_N

Start Z = DS_IL

 

End X = US_Pipe_E

End Y = US_Pipe_N

End Z = US_IL

 

And then i just need the Length of the line to fill out the Length in the Object Data Table.

 

Once i understand the concept i will need to do the same for the property connections and then pits. but am happy to try get one solved first.

This will literally save me hours every week and it has to be possible.

Any help will be so greatfully appreciated.

Drainage.dwg

Drainage.jpg

Link to comment
Share on other sites

No way, I'm sorry.

The START/END geometric fields are automatically fed up by the display list, so you cannot 'em edit.

You'd better add those custom 6 start/end as Object Data, sir.

 

smile.gif

Link to comment
Share on other sites

You can do it with a custom lisp routine or export to sdf format then data connect to it and run a number of calculations then import back into map and create OD tables.

If you just need a table showing the data you can try dataextract, why does it need to be object data?

Link to comment
Share on other sites

Know about Dspec but dont use it.

 

The D-SPEC standard (Drainage & Telecommunications – Optical Fibre standard) was created to enable Local Government authorities around Australia to participate in the use of a single specification when dealing with the creation of new council assets.

 

 

You need a commercial product and these are out there yeah but you will have to pay. The pipe is only 1 part of a huge number of objects that you need to export out. Get the entries wrong and your dspec will be rejected. I would google first to see who can supply a Autocad version. Are you in WA?

 

Dont like to dampen others enthusiasm but this one option will end up a can of worms. Alternatively it may be a viable commercial product.

 

A few to start Civilcad, Geocomp consulting, Listech

Link to comment
Share on other sites

No way, I'm sorry.

The START/END geometric fields are automatically fed up by the display list, so you cannot 'em edit.

You'd better add those custom 6 start/end as Object Data, sir.

 

smile.gif

 

I have no idea what you just said? i dont want to edit them i jsut want to copy paste them - which can be done physically i just want to automate it.

Link to comment
Share on other sites

You can do it with a custom lisp routine or export to sdf format then data connect to it and run a number of calculations then import back into map and create OD tables.

If you just need a table showing the data you can try dataextract, why does it need to be object data?

 

Yea i gathered i would need a lisp routine. i just dont know how to extract the correct data - and then get it back into the object data. how do i extract the co-ords to a spreadsheet and then import them back? help?

it needs to be the object data so then for that pipe all the information can be exported together - linked to the object for input into a GIS system. as Big Al said below - its for a Dspec submission. so it needs to be in the object data.

Link to comment
Share on other sites

Know about Dspec but dont use it.

 

 

 

You need a commercial product and these are out there yeah but you will have to pay. The pipe is only 1 part of a huge number of objects that you need to export out. Get the entries wrong and your dspec will be rejected. I would google first to see who can supply a Autocad version. Are you in WA?

 

Dont like to dampen others enthusiasm but this one option will end up a can of worms. Alternatively it may be a viable commercial product.

 

A few to start Civilcad, Geocomp consulting, Listech

 

Hi Big Al,

Im in victoria and I'm in the industry. I do Dspec submissions for the councils. just trying to develop a faster method of doing it using autoCAD map.

already use those programs but I like AutoCad Map better. We currently use Geocivil to do it but its old and clunky. I understand there are many aspects. i just need a grasp of what to do and i will develop the rest for each of the different objects etc.

so i need a lisp to export the geometric start/end co-ords to a table or excel or something and then i need a way of importing them to the correct object data. Anyone game to have a try? im new to lisp and dont have a strong programming background but im having a crack.

Link to comment
Share on other sites

You need to get into the xdata and look at all the properties (entget car (entsel)) ; pick line, look at the bit (102 . "{ACAD_XDICTIONARY") (360 . ) (102 . "}") this is the xdata link. I am trying to find some stuff I did as a bit of playing with xdata it may get used as part of a commercial product so I can not post.

 

If you look at this bit of code there are two parts the 1 is the variable name and the 40 is the value to go against that name. Not sure about OD:PIPE will paly a bit more.

 

(setq anXrec (entmakex (list (cons 0  "XRECORD")
(cons 100  "AcDbXrecord")
   (cons 1 wallvar)
   (cons 40 wallsize)
so in your case (cons 1 "Type") (cons 40 "Pipe")
(cons 1 "pipe_No")(cons 40 375)

Link to comment
Share on other sites

Ok thanks Big AL,

i tried to look at the x data

 

 

Command: (entget car (entsel))

Select object: ; error: bad argument type: lentityp #

 

so im kinda stuck there.

Link to comment
Share on other sites

Getting closer google "vla xdata" went to a autodesk website with un documented code example.

 

(setq ent (entget (car (entsel))))
(vla-GetXData (vlax-ename->vla-object (cdr (assoc -1 ent))) "" 'codes 'datas)

Link to comment
Share on other sites

Getting closer google "vla xdata" went to a autodesk website with un documented code example.

 

(setq ent (entget (car (entsel))))
(vla-GetXData (vlax-ename->vla-object (cdr (assoc -1 ent))) "" 'codes 'datas)

 

I looked this up and found what i think is the same thing. but that just doesnt ,make any sense to me. i wouldnt even know how to apply it or what variables to change to suit my problem :(

confused.

Link to comment
Share on other sites

The idea was to get the codes which would be the lables you see then get the values against these lables you can change them then pretty simply. ie ds_pit=Pit32.

 

How did you make the autocad dwg in the first place secondly if a Dspec file is required then can it not just be made form first principles there must be a set of rules for the file.

Link to comment
Share on other sites

The idea was to get the codes which would be the lables you see then get the values against these lables you can change them then pretty simply. ie ds_pit=Pit32.

 

How did you make the autocad dwg in the first place secondly if a Dspec file is required then can it not just be made form first principles there must be a set of rules for the file.

 

Yea ok that makes more sense to me.

 

i set it up using attach/detach object data > define object data > and created a new table - called it Pipe

then i defined each of the data fields by keying in a Field name

selecting the type of data (but can only choose from Integar/Character/Point and Real)

gave each a description and entered a Default value if applicable.

 

then saved them and attached it to an object - in the pipes case a line.

 

creating them was easy and i now have a template which loads with them all in it. with object data attached to the corresponding line or block (pit) and so on..

 

to complete the dspec submission i export the different components as seperate mid mif files

so i select all the pipes and export it to mid mif.

then i select all the pits and do the same

 

my problem is i need to automate filling in some of the info as the co-ords are right there and the length is right there but not in the Object data :(

at the moment manually copying and pasting is just so time consuming and impractical when i have entire estates to do. .. there has got to be a way

Link to comment
Share on other sites

When you export to MID/MIF you can create the attributes from the properties of the lines. No need to create the Object Data unless you want to keep it as dwg.

See attached.

 

export_property.jpg

Link to comment
Share on other sites

Ok cool, that's awesome. I didn't realise there was more options and that you could rename the outputs!

i think that has basically solved my problem :) i just need to set them all up and save a template!

I see that i can use X1,Y1 and Z1 , X2,Y2 and Z2 as well.

 

thank you so much for your help Murph! I appreciate it. i havent tested it yet but if i export this

then when i do the reverse and import it - fingers crossed it will work. ill test it when i get a chance today.

Cheers Again!

Link to comment
Share on other sites

I didn't realise there was more options

 

The Murph's advice is exactly what I wrote in my very first post about: my poor english is guilty, that's why you didn't get it, sir...

 

smile.gif

Link to comment
Share on other sites

  • 3 weeks later...

If you have access to ArcGIS this is typically the sort of data i would calculate using the innate geometry calculator and geoprocessing features.

Link to comment
Share on other sites

  • 1 year later...

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...