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

Elevations from Blocks

15 REPLIES 15
SOLVED
Reply
Message 1 of 16
josh.bonora
2699 Views, 15 Replies

Elevations from Blocks

Hello all,

 

I have a survey provided by a client in the form of a series of contour lines displayed as blocks, about 10500 of them i.e each block is a part of a contour. The blocks themselves have no elevations or z values and if i explode them they become polylines again with no elevations of course. They do however have an attribute for each block called an 'autocad_elevation' which has a value, possibly created by the client using some other form of software. My main question is, is there a way to transfer the values of this attribute to the z values of the block? I could than either add the blocks to the surface using the add drawing objects or just explode them and add the polylines as breaklines.

 

I have already tried the 'moveblockstoattribelev' command but it seems i can only do one at a time. Like i said there is about 10500 of them all named different blocks. I have seen some other posts on here looks like people have had similar problems and have ended up using lisp routines and such but havent yet gotten any to work on mine. I am currently using Civil3D 2013. The file is quite large but would be able to upload a sample if required. We have already requested an alternate form of survey but wouldnt mind knowing if this could be done anyway.

 

Thanks

Josh

15 REPLIES 15
Message 2 of 16
antoniovinci
in reply to: josh.bonora

Could you upload a sample, better if _WBLOCKed as 2004 release..?

Message 3 of 16
BrianHailey
in reply to: josh.bonora

Most likely the attribute is not being displayed in the drawing (i.e. it's invisible). If that's the case, set ATTDISP to ON. Next, use the command, "MOVEBLOCKSTOATTRIBELEV". It can be found on the Surface contextual ribbon tab.

 

 

Once completed, set ATTDISP back to Normal if you changed it earlier.

 

Explode and create your surface!

Brian J. Hailey, P.E.



GEI Consultants
My Civil 3D Blog

Message 4 of 16
josh.bonora
in reply to: BrianHailey

I am pretty sure the attribute is already visible, like i said in the post i already tried the 'move blocks to attributee elevation' command. My problem with that command is that i can only do one at a time! i.e i am prompted to then select a block reference name or pick a block from the dwg. I have 10500 SEPARATE blocks as contour lines in the dwg, so im not going to do them one at a time. Unless there is a way that command can be applied to multiple blocks i dont think it can help me. I will upload a sample with a few of the blocks.

Message 5 of 16
Jeff_M
in reply to: josh.bonora

Here is a simple, but usable, lisp that will explode the blocks, set the resulting polyline(s) to the elevation of the attribute, and finally delete the original blocks. It does no error checking so be sure to select just the blocks you want to use.

 Just save the lisp, load it using APPLOAD, and run using the command "multi_blks_to_attribute_elevation"

Jeff_M, also a frequent Swamper
EESignature
Message 6 of 16
josh.bonora
in reply to: Jeff_M

Thanks Jeff, that worked brilliantly and was just what i needed. Cheers

Message 7 of 16
KPerison
in reply to: Jeff_M

Jeff,

 

I have a similar issue as the original poster. Except I have multiple dwgs of survey Cogo points with multiple attributes including Pnt#, Elev, Dec, Note, Name, Code.  The original ASCII file is no where to be found.  

Each Cogo point block is visually identical except each block has an incremented name (ie: Point1,Point2,....Point305,... etc) I need to move these blocks insertion Z coordinate to the value of attribute tag ELEV.  I have been using the "MOVEBLOCKSTOATTRIBELEV" command, but it only works on one block name at a time.

I've been trying several other lisp routines, but haven't been able to crack this nut so far.  

Is there a way to use the "MOVEBLOCKSTOATTRIBELEV" command on mutiple block names that all have the specified attribute Tag?

Sample file included.

Thoughts?

 

Regards,

Kelly

Message 8 of 16
Jeff_M
in reply to: KPerison

Kelly,

Attached is a small lisp that should accomplish this for you. Note that it will likely crap out if teh ELEV attribute has anything other than a number value, but otherwise should be fine.

 

Jeff

Jeff_M, also a frequent Swamper
EESignature
Message 9 of 16
KPerison
in reply to: Jeff_M

Jeff,

 

Thank you very much!

Your posts to these discussion groups are always useful and informative.

Can't say how many times you've pulled me out of the ditch with your solutions. 

I guess thats why you've got 1400 Kudos and 1000 solutions!

 

This community is awsome. Always willing to help.

 

Kelly

Message 10 of 16
neilyj666
in reply to: KPerison

@Jeff_M  is the "go to guy" for this type of thing and he always comes up with a solution.

neilyj (No connection with Autodesk other than using the products in the real world)
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


AEC Collection 2024 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
Message 11 of 16
Anonymous
in reply to: Jeff_M

Thanks for posting. This LISP would work for me as well, but my blocks have 3 attributes. Is there a way to modify this LISP to pull the elevation from a specific attribute tag?

 

 

Message 12 of 16
Jeff_M
in reply to: Anonymous

@Anonymous, the lisp I posted does exactly that. It searches all of the attributes in a block looking for one with the ELEV tag. If your block uses a different Tagstring, just edit the lisp and replace the ELEV with yours.

 

Oh, and welcome to the forums!

Jeff_M, also a frequent Swamper
EESignature
Message 13 of 16
aes.caldas
in reply to: Jeff_M

Thanks for the LISP and the info about the ELEV tag. It saved me a lot of time!

Message 14 of 16
nonofthem
in reply to: Jeff_M

Dear,

i have autocad file which contains attributes and i want to extract x y and z values to use in cad civil 3d

please any lisp or other solution 

Message 15 of 16
neilyj666
in reply to: nonofthem

Simple Data Extraction will work - although X and Y may need to be modified to suit your coordinate system (I suspect they are shown in mm not m)

 

2019-07-22 10_06_27-SAMPLE DRAWING FOR ATTRIBUTES.xls  [Compatibility Mode] - Excel.jpg

neilyj (No connection with Autodesk other than using the products in the real world)
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


AEC Collection 2024 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
Message 16 of 16
neilyj666
in reply to: nonofthem

and with screencast - https://knowledge.autodesk.com/community/screencast/41ad97c7-3059-43d0-bf80-a61686d7eded

neilyj (No connection with Autodesk other than using the products in the real world)
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


AEC Collection 2024 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report