Results 1 to 9 of 9

Thread: Text Copy then Delete the Source Text After

  1. #1
    Member
    Join Date
    2013-02
    Posts
    49
    Login to Give a bone
    0

    Default Text Copy then Delete the Source Text After

    Hi everyone

    Could you please help me create a routine that "Copy Text then Delete the Source Text After"

    Thank you in advance

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,665
    Login to Give a bone
    0

    Default Re: Text Copy then Delete the Source Text After

    Why not just move the text?
    Are you just trying to bring the text in front of other objects?
    Is there something else you're trying to accomplish?

  3. #3
    Member
    Join Date
    2013-02
    Posts
    49
    Login to Give a bone
    0

    Default Re: Text Copy then Delete the Source Text After

    Image.JPG

    I am transferring the existing level text to my company standard block. Then I need to delete the source text after.

    Please find attached image for reference.

    Hope you can help me on this.

    Thank you so much Tom for your time.

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,665
    Login to Give a bone
    0

    Default Re: Text Copy then Delete the Source Text After

    Not sure if you're copying the text into the block or an attribute but couldn't you just use the SELECTSIMILAR (Command) to select all the source text afterwards to delete easy enough.
    If you want a lisp you need to attach a drawing showing before and after the text was copied to the block for anyone here to write the code you're asking for.

  5. #5
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    559
    Login to Give a bone
    0

    Default Re: Text Copy then Delete the Source Text After

    Ok a couple of questions as I need a dwg to really comment, having dealt with points for years, its simple to insert a block getting the adjacent text value. The problem I see is the point represented by the Circle ? Need a sample as gap between circle and text must be known otherwise people like me are guessing this value.

  6. #6
    Member
    Join Date
    2022-10
    Posts
    12
    Login to Give a bone
    0

    Default Re: Text Copy then Delete the Source Text After

    This would be the simplest LISP solution to how I understand your request:
    Code:
    (setq obj (entsel))
    (setq ent (entget (car obj)))
    (setq content (cdr (assoc 1 ent)))
    (setq position (cdr (assoc 10 ent)))
    (setq rotation (rtos (* 180(/ (cdr (assoc 50 ent)) pi))))
    (command "_insert" "BLOCKNAMEHERE" position "" "" rotation content )
    (command "_.ERASE" obj "" )
    It is just the core (done quick and dirty). I know that guys here can give you much more complex (covering all possibilities) and nicer looking solution if you give them more details.

    It asks you to select text (well, any object as I have no filters here, but I rely on you), it then takes out contents, position and rotation of this text. Then it inserts block (company one, I assume you have it in supported path) and inputs position, rotation and contents into the first attribute.
    Last step deletes the original text.

    You could also make it select automatically (via ssget "x" and some filters - text + probably layer or other identifier depending on your setup) and then run this series through cycle (while or repeat) on each text in a file.

    This core code, while it is definitely not the best practice, can be put in tool palette or such. If you add defun and some name it can be in theory called by command etc.

  7. #7
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,100
    Login to Give a bone
    0

    Default Re: Text Copy then Delete the Source Text After

    If the original data is included in a block, can you rename that block to your desired block name? No, that won't update the look. There is more to this process. If the current block has an attribute, you may need to block edit the current block to rename the attribute. Once that is done, insert the desired block w/ attribute to redefine the block. You may have to do an AttSync on the affected blocks to get the attributes rotated to match the new definition.

    Just a thought.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  8. #8
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    559
    Login to Give a bone
    0

    Default Re: Text Copy then Delete the Source Text After

    NalkCZ no need for 2 lines, also a good idea to have a prompt.

    (setq ent (entget (car (entsel "\nPlease select text "))))

    Also the angle input depends on the Aunits variable if set to 3 ie radians then just use (cdr (assoc 50 ent)) no need to convert to degrees.

  9. #9
    Member
    Join Date
    2022-10
    Posts
    12
    Login to Give a bone
    0

    Default Re: Text Copy then Delete the Source Text After

    Thank you. I tried to make it simple and therefore not to put too many steps in one.
    But I did not know about radians being in Aunits. I hardly ever rotate objects in my routines, but I noticed original poster does, so I tried to accommodate.

Similar Threads

  1. Replies: 0
    Last Post: 2016-10-28, 05:44 PM
  2. 2014: Rendering does not start, then rendering dialog disappears, then 3D view turns black
    By gabsimonelouise692565 in forum Revit - Rendering
    Replies: 2
    Last Post: 2015-06-02, 07:34 PM
  3. 2013: Lighting Fixture Light Source Shows Black After Render in Cloud
    By BIMbeliever in forum Revit MEP - General
    Replies: 0
    Last Post: 2013-04-12, 01:05 PM
  4. Replies: 1
    Last Post: 2011-11-16, 12:41 PM
  5. Non-ordinary walls then philosophy then tablets/flatscreens
    By aghis in forum Revit Architecture - General
    Replies: 57
    Last Post: 2003-07-19, 05:23 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
  •