Results 1 to 7 of 7

Thread: Replace /P with a Space

  1. #1
    I could stop if I wanted to
    Join Date
    2003-03
    Location
    Alberta
    Posts
    260
    Login to Give a bone
    0

    Default Replace /P with a Space

    I have a DText entity that uses a Field to copy the contents of an MText entity into other areas of a title block. I need to replace the \P from the MText with a space.
    Example:
    What I get = WATER COURSE\PGENERAL LAYOUT
    What I need = WATER COURSE GENERAL LAYOUT
    CAD Developer
    AutoCAD 2015 | 2017
    AutoCAD Civil 2015 | 2017
    Inventor 2017
    MS Visual Studio 2015

    LinkedIn

  2. #2
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    431
    Login to Give a bone
    0

    Default Re: Replace /P with a Space

    Any reason why the DText with a field entity can't be changed to an MText entity with a field?

    or edit the length of the MText being referenced by the Dtext field such that the text in the Mtext will auto wrap and not need a manual line shift.

  3. #3
    I could stop if I wanted to
    Join Date
    2003-03
    Location
    Alberta
    Posts
    260
    Login to Give a bone
    0

    Default Re: Replace /P with a Space

    The MText shows large print in a box of the title block and the DText needs to show the same value in smaller lettering along a single line on the title block border. The small text runs up the side of the border, vertically. There is only enough space for the smaller text to show a single line. Title block is from a government standard.
    CAD Developer
    AutoCAD 2015 | 2017
    AutoCAD Civil 2015 | 2017
    Inventor 2017
    MS Visual Studio 2015

    LinkedIn

  4. #4
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    431
    Login to Give a bone
    0

    Default Re: Replace /P with a Space

    Ah, and you're trying to use the DText as a way to remove the line shift in the MText. I think I get it now.

    Edit the MText and use a Shift+Enter for the line shift. It puts a different character in the MText that the DText reads as a space.

  5. #5
    I could stop if I wanted to
    Join Date
    2003-03
    Location
    Alberta
    Posts
    260
    Login to Give a bone
    0

    Default Re: Replace /P with a Space

    Guess that will have to do for now. Would be better if there was something the Field code could do. I can see drafters making mistakes with this workaround.
    CAD Developer
    AutoCAD 2015 | 2017
    AutoCAD Civil 2015 | 2017
    Inventor 2017
    MS Visual Studio 2015

    LinkedIn

  6. #6
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    431
    Login to Give a bone
    0

    Default Re: Replace /P with a Space

    Yea, its not ideal for sure.

    You mentioned that these fields are related to a titleblock and sheet border. Are these values being manually entered on each sheet or are they being supplied by the sheet set manager?

  7. #7
    Member
    Join Date
    2002-10
    Location
    Alexandria, MN
    Posts
    2
    Login to Give a bone
    0

    Default Re: Replace /P with a Space

    I take it that your Mtext appears on 2 lines & you want the Dtext to be 1 line. If you remove the hard break in the Mtext (don't hit enter to create the sencond line of text) & change the width of the Mtext so that you have 2 lines, the Dtext will not have the /P in it. /P is the code for a hard bread in the text & the field is reading it.

Similar Threads

  1. Replies: 1
    Last Post: 2017-03-01, 01:51 PM
  2. Add replace function "Replace from Clipboard".
    By Wish List System in forum Inventor Wish List
    Replies: 0
    Last Post: 2013-02-01, 08:03 AM
  3. Replies: 0
    Last Post: 2011-10-21, 06:44 PM
  4. Replace space with character in text
    By d_m_hopper in forum AutoLISP
    Replies: 15
    Last Post: 2010-02-10, 08:06 PM
  5. Replace space in text with period
    By andrew.handley782323 in forum AutoLISP
    Replies: 7
    Last Post: 2009-10-08, 04:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •