AutoCAD Civil 3D General

Reply
*Expert Elite*
neilyj
Posts: 3,479
Registered: ‎08-01-2008
Message 1 of 8 (891 Views)
Accepted Solution

Label assembly with field automatically

891 Views, 7 Replies
02-21-2011 07:48 AM

Found a link to some code (http://c3dxtreme.blogspot.com/2010/12/automatically-label-those-road.html) to automatically place an Mtext field to label assemblies. It was written for C3D 2009/2010 but I can't get it to work for 2011 - any VBA gurus care to take a look to see if it will run (or not) on 2011

 

Thanks

neilyj
(No connection with Autodesk other than using the products in the real world)


IDSP Premium 2014 (mainly Civil 3D 2014 UKIE SP1 & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 256Gb SSD, 300Gb 15,000 rpm HDD
16Gb Ram Intel Xeon CPU E5-1607 0 @ 3.00GHz (4 CPUs), ~3.0GHz
NVIDIA Quadro 4000, Dual 27" Monitor, Dell T3600
*Expert Elite*
Jeff_M
Posts: 3,959
Registered: ‎07-22-2003
Message 2 of 8 (876 Views)

Re: Label assembly with field automatically

02-21-2011 09:21 AM in reply to: neilyj

Well, I was able to modify the file so it works in both 2009 & 2010. The same file should work in 2011, but I can't test it because I do not want to install the VBA enabler. I've made a few other minor changes as well, but since Justin is the one who posted this routine I feel I should ask him if he'd like to post the revised file or if he wouldn't mind me doing so here. I've sent him an email asking just this....

Jeff_M, also a frequent Swamper
Valued Mentor
Posts: 388
Registered: ‎09-23-2008
Message 3 of 8 (864 Views)

Re: Label assembly with field automatically

02-21-2011 11:57 AM in reply to: neilyj

Wow, quick work gettingthat link killed!

*Expert Elite*
Jeff_M
Posts: 3,959
Registered: ‎07-22-2003
Message 4 of 8 (858 Views)

Re: Label assembly with field automatically

02-21-2011 12:37 PM in reply to: KirkNoonan

The link is exactly how it's posted on the blog. I think there's a problem there, not with someone "getting it killed". :smileyhappy: Here's a link to the page it's on: C3DExtreme

 

Justin has granted permission for me to post the updates here.

 

Attached is a zip file with both a VBA and Lisp version of the code. Either should work in any version of C3D. There is a Readme with a little more info. 

Jeff_M, also a frequent Swamper
*Expert Elite*
neilyj
Posts: 3,479
Registered: ‎08-01-2008
Message 5 of 8 (825 Views)

Re: Label assembly with field automatically

02-22-2011 12:26 AM in reply to: neilyj

Many thanks Jeff_M (and Justin) for the quick turnaround to this request - I've just tried the lisp version and it works perfectly

 

PS in the original link I posted, an extra bracket had crept in at the end so the link didn't work

neilyj
(No connection with Autodesk other than using the products in the real world)


IDSP Premium 2014 (mainly Civil 3D 2014 UKIE SP1 & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 256Gb SSD, 300Gb 15,000 rpm HDD
16Gb Ram Intel Xeon CPU E5-1607 0 @ 3.00GHz (4 CPUs), ~3.0GHz
NVIDIA Quadro 4000, Dual 27" Monitor, Dell T3600
*Expert Elite*
jmayo
Posts: 2,427
Registered: ‎11-13-2006
Message 6 of 8 (805 Views)

Re: Label assembly with field automatically

02-22-2011 05:03 AM in reply to: neilyj

Thanks for the additional work of the lisp version. I've been coping mtext objects from assembly to assembly and editing the field. I'll give it a shot in a bit.

John Mayo, PE
IDSP 2014
Win 7 64, Xeon ES165@3.2Ghz,
64 GB RAM, Quadro K4000 (x2)
Distinguished Contributor
sadekcivil
Posts: 142
Registered: ‎10-19-2011
Message 7 of 8 (364 Views)

Re: Label assembly with field automatically

12-30-2012 03:18 AM in reply to: Jeff_M

I tried to try VBA with Civil 3D 2012 and it didn't work

 

Thank you in advance.

 

 

Please do not forget approve as solutions and Points
to Remember Please Accept as Solution and Kudos Please
*Expert Elite*
Jeff_M
Posts: 3,959
Registered: ‎07-22-2003
Message 8 of 8 (351 Views)

Re: Label assembly with field automatically

12-30-2012 07:44 AM in reply to: sadekcivil

A little more information would be helpful. "It didn't work" is not very descriptive. Were there any error messages or warnings? How did you load and run it? DId you try the lisp version?

 

I cannot test it in 2012 because I did not, nor plan to, install the VBA Enabler.

Jeff_M, also a frequent Swamper

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Civil 3D Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for AutoCAD Civil 3D helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Civil 3D

Twitter

Facebook

Blogs