Copy xref entities to current drawing?

Discussion in 'AutoCAD' started by reneram, Sep 28, 2004.

  1. reneram

    reneram Guest

    Hello everybody,
    I'm putting down an application that uses xref's as base to create a new drawing. At the point in which I am, I've already inserted my xref in a block named "MDR" as an overlay and can cycle through it's entities with the following code:

    --- snip
    Dim objBlkMDR As AcadBlock 'this is the block with the xref
    Dim MDREntity As AcadEntity 'this entity is in the xref
    Dim objCopy As AcadEntity 'the copy of the entity

    ... some code not related with problem ...

    Set objBlkMDR = ThisDrawing.Blocks.item("MDR")

    For Each MDREntity In objBlkMDR
    If "condition (i.e.: the entity is in a specific layer)" then
    "copy that entity from the xref to the current drawing"
    end if
    Next


    --- snip

    I've tried to copy the object to another and then simply change the layer, but with no result; also I've tried some methods like .CopyObjects or assinging my ent to a variant array (dim Dest() as Variant), but nothing. :-(((
    Any suggestions or sample code!

    Thanks in advance
    René
     
    reneram, Sep 28, 2004
    #1
  2. reneram

    Jürg Menzi Guest

    Hi René

    Check 'CopyObjects' in AutoCAD's help...

    Cheers
     
    Jürg Menzi, Sep 28, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.