• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk ObjectARX

    Reply
    Distinguished Contributor
    Posts: 341
    Registered: ‎08-15-2003

    Performing INSERT blockname=path

    85 Views, 2 Replies
    09-25-2012 06:07 AM

    Hello

    How can I do this programatically w/o using Command...?

    Thanks

    alex

    Please use plain text.
    Moderator
    Alexander.Rivilis
    Posts: 1,167
    Registered: ‎04-09-2008

    Re: Performing INSERT blockname=path

    09-25-2012 06:49 AM in reply to: alex_b

    I understand you're going to replace one existing block other block of the file. Then you can:

    1) Create AcDbDatabase;

    2) Read into this AcDbDatabase from dwg-file (using AcDbDatabase::readDwgFile() method);
    3) Use the method AcDbDatabase::insert() to insert the block;
    4) AcDbObjectId::swapIdWith () to switch between the new and the old block
    5) Old block can be removed.
    Something like that. :smileyhappy:


    Пожалуйста не забывайте про Утвердить в качестве решения!Утвердить в качестве решения и Give Kudos!Баллы
    Please remember to Accept Solution!Accept as Solution and Give Kudos!Kudos

    Please use plain text.
    Distinguished Contributor
    Posts: 341
    Registered: ‎08-15-2003

    Re: Performing INSERT blockname=path

    09-26-2012 08:15 AM in reply to: Alexander.Rivilis

    Thank you, Alexander

    alex

    Please use plain text.