Lisp for Adding/Subtracting Elevations in MText

Discussion in 'AutoCAD' started by Todd, Aug 12, 2004.

  1. Todd

    Todd Guest

    We use Mulitline text to show our proposed elevations, such as

    10.50 TC
    10.00 AC

    We need to lower all of our grades 0.10'. Is there a lisp that will lower
    the elevations and still keep the text at the end of the elevation. The
    final product should look like this, and keep the existing justification.

    10.40 TC
    9.50 AC

    Thanks.
     
    Todd, Aug 12, 2004
    #1
  2. Todd

    John Uhden Guest

    I've got an EDITNUM routine for text and attributes that does just that, but I
    haven't spruced it up for Mtext because of all the possible formatting issues
    that can easily cause weird results. Okay, so I made up the UNFORMAT function
    for Steve Doman's SripMtext, but that was meant for removing formatting, not
    changing interpreted values contained therein.

    Imagine an apparently simple Mtext object that appears to read "10.00 TC" and
    then extract it's TextString value to find it might look like
    "{\\fVerdana|b0|i0|c0|p34;\\C1;10.\\C2;00\\fUnivers|b0|i0|c0|p34;\\H0.6667x;\\C3
    ; TC}"

    AAUUUGGHHH! Maybe someone has a freeware widget that can deal with this, and
    bless them if they do. I don't just yet. Now I could plug in the UNFORMAT
    function and deal with Mtext by forcing the formatting removal, but I don't know
    if people would want to lose formatting.
     
    John Uhden, Aug 12, 2004
    #2
  3. Todd

    Rakesh Rao Guest

    Hi Todd,

    Our GeoTools program has a tool called GT_MODTXT (globally modify
    text/mtext) that does just this. In addition to many other options and
    capabilities, it can also globally increment or decrement text or
    multi-line mtext, which is what you want.

    You can download a fully functional evaluation download at thsi URL:

    www.4d-technologies.com/geotools/

    You may also want to take a look at our MyGeoTools page for more info
    and options:

    www.4d-technologies.com.geotools/my_geotyools.htm,

    Regards
    Rakesh

    --
    --
    - Rakesh Rao [ rakesh.rao (at)4d-technologies.com ]
    - Four Dimension Technologies
    [www.4d-technologies.com]
    - Get GeoTools, Work smarter: www.4d-technologies.com/geotools
    - Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter
     
    Rakesh Rao, Aug 12, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.