AutoCAD Civil 3D General Discussion

AutoCAD Civil 3D General Discussion

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

Label assembly with field automatically

985 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 2015 (mainly Civil 3D 2015 UKIE & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 240Gb SSD, 1Tb HDD
32Gb Ram Intel Xeon CPU E5-2650 v2 @ 2.6GHz (32 CPUs), ~2.6GHz
NVIDIA Quadro K4000, Dual 27" Monitor, Dell T5610
*Expert Elite*
Jeff_M
Posts: 4,297
Registered: ‎07-22-2003
Message 2 of 8 (969 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
KirkNoonan
Posts: 421
Registered: ‎09-23-2008
Message 3 of 8 (957 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: 4,297
Registered: ‎07-22-2003
Message 4 of 8 (951 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,734
Registered: ‎08-01-2008
Message 5 of 8 (918 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 2015 (mainly Civil 3D 2015 UKIE & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 240Gb SSD, 1Tb HDD
32Gb Ram Intel Xeon CPU E5-2650 v2 @ 2.6GHz (32 CPUs), ~2.6GHz
NVIDIA Quadro K4000, Dual 27" Monitor, Dell T5610
*Expert Elite*
jmayo
Posts: 2,798
Registered: ‎11-13-2006
Message 6 of 8 (898 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
onsionsi1
Posts: 144
Registered: ‎10-19-2011
Message 7 of 8 (457 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: 4,297
Registered: ‎07-22-2003
Message 8 of 8 (444 Views)

Re: Label assembly with field automatically

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

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
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.