• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD Civil 3D

    Reply
    *Expert Elite*
    neilyj
    Posts: 2,689
    Registered: ‎08-01-2008
    Accepted Solution

    Label assembly with field automatically

    677 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 but also 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
    Please use plain text.
    *Expert Elite*
    Posts: 3,049
    Registered: ‎07-22-2003

    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
    Please use plain text.
    Valued Mentor
    Posts: 277
    Registered: ‎09-23-2008

    Re: Label assembly with field automatically

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

    Wow, quick work gettingthat link killed!

    Please use plain text.
    *Expert Elite*
    Posts: 3,049
    Registered: ‎07-22-2003

    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
    Please use plain text.
    *Expert Elite*
    neilyj
    Posts: 2,689
    Registered: ‎08-01-2008

    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 but also 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
    Please use plain text.
    *Expert Elite*
    johnm
    Posts: 1,717
    Registered: ‎11-13-2006

    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
    C3D 2012, RD 2012
    Win 7 64, Core i7,
    6 GB RAM, Quadro FX 1700
    Please use plain text.
    Distinguished Contributor
    sadekcivil
    Posts: 138
    Registered: ‎10-19-2011

    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
    Please use plain text.
    *Expert Elite*
    Posts: 3,049
    Registered: ‎07-22-2003

    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
    Please use plain text.