Results 1 to 2 of 2

Thread: Changing attribute text strings using ObjectDBX

  1. #1
    Login to Give a bone
    0

    Default Changing attribute text strings using ObjectDBX

    I am by no means a slouch in the programming sense, but seek the help of my peers...

    I can invoke objDbx but seek any help with respect to searching through the blocks collection to change attribute text strings? My plan is to create a series of drawings based on a template and a series of strings from an excel spreadsheet. The opening and saving goes well, but at the point of my searching for text strings within attributes (eg AttVal1, Attval2 etc) the code says it is working, but it does not change and does not save this.

    Does anyone have an example of iterating through the blocks collection of both model and paper space to find attributes and replace them?

    Any and all help is appreciated.

    Brett

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,520
    Login to Give a bone
    0

    Default Re: Changing attribute text strings using ObjectDBX

    I'm confused....

    You're asking for help coding for ObjectDBX in the RealDWG forum, and haven't posted any code... What API are you using (i.e., Visual LISP, .NET, etc.)?

    You have to iterate both, the applicable Layout's Block (i.e., model, paper, or both), and the BlockTableRecord, iterating each matching BlockReference's Attributes, and correspond them to the BlockTableRecord's Attribute, only then can you change the Attribute's TextString provided the Object(s) are = OpenMode.ForWrite... And be sure to call <Transaction>.Comitt() when done (some of this is .NET API jargon).
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

Similar Threads

  1. VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool
    By katrinanjim in forum VBA/COM Interop
    Replies: 53
    Last Post: 2017-06-11, 09:56 PM
  2. HOw to add attribute and modified by objectdbx?
    By nokiya2000 in forum AutoLISP
    Replies: 4
    Last Post: 2009-09-15, 11:22 PM
  3. text strings on schedules?
    By timsea81 in forum Revit MEP - General
    Replies: 1
    Last Post: 2009-05-08, 04:30 PM
  4. Text strings in Dimensions
    By DaveP in forum Revit Architecture - Wish List
    Replies: 3
    Last Post: 2006-06-26, 12:34 AM
  5. formating text strings
    By rwbaker in forum VBA/COM Interop
    Replies: 6
    Last Post: 2005-09-20, 06:02 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
  •