+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Junior Member
    Discipline
    Architectural
    Using
    AutoCAD 2014
    Join Date
    Sep 2017
    Posts
    20

    Default Attribute to Object Field

    Registered forum members do not see this ad.

    hi, can somebody help me?


    I want to select an attribute block and convert it to an Object Value field.


    Currently my workflow is this :
    Edit the attribute value
    Highlight and select "Insert Field"
    Under Field Category, I select Object
    Under object type I pick which object I want the field to insert
    Under Object Type properties, I select VALUE
    on the Preview, I choose Uppercase.


    wonder if this can be automated by just picking the attribute in the screen and convert it automatically to FIELD using Object Value.


    Thanks in advance.

  2. #2
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,901

    Default

    This is the reverse of what you want http://www.lee-mac.com/getfieldobjects.html but may give some ideas.
    Last edited by BIGAL; 8th Dec 2017 at 11:36 pm.
    A man who never made mistakes never made anything

  3. #3
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,901
    A man who never made mistakes never made anything

  4. #4
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,368

    Default

    You could use my Quick Field application to create a program which will allow you to accomplish this - please read the instructions provided on the program page and in the code header.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  5. #5
    Junior Member
    Discipline
    Architectural
    Using
    AutoCAD 2014
    Join Date
    Sep 2017
    Posts
    20

    Default

    I tried this one :

    Code:
    (defun c:test4 ( ) (LM:QuickField "Textstring" "%tc1" 1))
    and I get an error:

    Code:
    Command: TEST4
    Select Object with Textstring property:
    Object does not have Textstring property.
    Select Object with Textstring property:
    Object does not have Textstring property.
    I was selecting an Attribute tag that contains the value which I want to convert to field.


    This is the field expression :
    Code:
     %<\AcObjProp Object(%<\_ObjId 8796087809088>%).TextString \f "%tc1">%

  6. #6
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,368

    Default

    Oh, sorry you may need to change line 273 from:
    Code:
                    (list 'if '(setq ent (LM:quickfield:selectifhasprop prop entsel))
    to:
    Code:
                    (list 'if '(setq ent (LM:quickfield:selectifhasprop prop nentsel))
    The program will currently select the block reference when selecting an attribute within a block.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  7. #7
    Junior Member
    Discipline
    Architectural
    Using
    AutoCAD 2014
    Join Date
    Sep 2017
    Posts
    20

    Default

    Hi Lee, it's turning the attribute into a Field but appears as ####.
    I've tried on several attribs and the result are the same. any thoughts why?

  8. #8
    Full Member
    Using
    not applicable
    Join Date
    May 2009
    Posts
    84

    Default

    just regenerate the drawing (type "_rga" at the commandline)
    sysvar "fieldeval" may also be usefull

    regards
    Wolfgang

  9. #9
    Junior Member
    Discipline
    Architectural
    Using
    AutoCAD 2014
    Join Date
    Sep 2017
    Posts
    20

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by wkplan View Post
    just regenerate the drawing (type "_rga" at the commandline)
    sysvar "fieldeval" may also be usefull

    regards
    Wolfgang

    I did re-generate but still the same. Fieldeval is set to 31.

Similar Threads

  1. attribute with a field
    By samifox in forum AutoCAD General
    Replies: 4
    Last Post: 31st May 2016, 07:37 pm
  2. AutoLISP - move value from object data field to elevation field
    By cfculligan in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 11th Aug 2014, 08:12 am
  3. How to reference attribute in a field
    By krackpot in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 0
    Last Post: 24th Jul 2009, 03:04 pm
  4. FIELD in Attribute
    By daveacad in forum AutoCAD Drawing Management & Output
    Replies: 0
    Last Post: 9th Mar 2009, 12:01 pm
  5. block with field attribute
    By tibi in forum AutoCAD Drawing Management & Output
    Replies: 0
    Last Post: 15th Nov 2008, 10:31 pm

Bookmarks

Posting Permissions

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