Results 1 to 5 of 5

Thread: modify existing text objects

  1. #1
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default modify existing text objects

    I am not sure where to go from here, I think the code I have will select a text and add a %%u in front of it to underline it, but I dont know how to get the text to actually change. Any help would be appreciated.

    Code:
    (defun c:cv ()
      (vl-load-com)
      (setq	SSET  (ssget (list (cons 0 "TEXT,mtext,attdef")))
    	TEXT  (vlax-ename->vla-object SSET)
    	TEXT2 (strcat "%%u" (vla-get-textstring TEXT))
      )
    )
    [ Moderator Action = ON ] What are [ CODE ] tags... [ Moderator Action = OFF ]
    Last edited by Opie; 2005-11-02 at 11:21 PM. Reason: [CODE] tags added

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

    Default Re: modify existing text objects

    Loot into vla-put functions.
    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

  3. #3
    All AUGI, all the time CAB2k's Avatar
    Join Date
    2016-01
    Location
    Brandon, Florida
    Posts
    687
    Login to Give a bone
    0

    Default Re: modify existing text objects

    Code:
    (defun c:cv (/ ss ename obj)
      (vl-load-com)
      (setq ss (ssget (list (cons 0 "TEXT,attdef")))) ; removed mtext, %%u won't work on mtext
      (and ss ; must test for nil
           (setq i -1)
           (while (setq ename (ssname ss (setq i (1+ i))))
             (setq obj (vlax-ename->vla-object ename))
             (vla-put-textstring obj (strcat "%%u" (vla-get-textstring obj)))
             (vlax-release-object obj)
           )
      )
      (princ)
    )

  4. #4
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: modify existing text objects

    that works great, thanks for the assistance

    Is there somewhere to get a list of the vla commands, like the vla-get-textstring, I looked in the developer help, and can not find a list that tells me what they are, or how to use them
    Last edited by ccowgill; 2005-11-04 at 10:28 AM. Reason: add quesiton

  5. #5
    All AUGI, all the time CAB2k's Avatar
    Join Date
    2016-01
    Location
    Brandon, Florida
    Posts
    687
    Login to Give a bone
    0

    Default Re: modify existing text objects

    The key for me is VLIDE. If you use it as an editor it is easy to look up.
    Just find the button (A) and click it. It will bring up a search dialog.
    Another way is to highlight a function in the edit window then click the button.
    The window that pops up will have a list of functions. Highlight one & click the
    help icon in that window. Another is to highlight part of a function & click the
    (A) button. Play with it.

Similar Threads

  1. Replies: 5
    Last Post: 2016-08-11, 11:35 PM
  2. Modify existing surface edits
    By Wish List System in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2014-11-14, 03:26 PM
  3. Can you modify existing functions in C#.
    By mark.galba615743 in forum Dot Net API
    Replies: 3
    Last Post: 2014-04-04, 12:12 AM
  4. Phasing vs. Modelling - Modify existing wall construction
    By 3dway in forum Revit Architecture - General
    Replies: 9
    Last Post: 2008-07-18, 01:50 AM
  5. modify existing .lsp
    By tomcarver in forum AutoLISP
    Replies: 2
    Last Post: 2008-06-10, 09:59 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
  •