Relative Path Xref's

Discussion in 'AutoCAD' started by Andrew W. Schmidt, Sep 10, 2003.

  1. I use the following code to attach an xref. With 2004 you can now have
    relative xref paths, is it possible to use a relative path in VBA? If so
    how do I do it?

    Set insxref = ThisDrawing.ModelSpace.AttachExternalReference(file, blkname,
    inspt, xsc, ysc, zsc, rot, False)

    Thanks,
    Andrew
     
    Andrew W. Schmidt, Sep 10, 2003
    #1
  2. Change the Path property after the object is added. ;-)


    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | I use the following code to attach an xref. With 2004 you can now have
    | relative xref paths, is it possible to use a relative path in VBA? If so
    | how do I do it?
    |
    | Set insxref = ThisDrawing.ModelSpace.AttachExternalReference(file,
    blkname,
    | inspt, xsc, ysc, zsc, rot, False)
    |
    | Thanks,
    | Andrew
    |
    |
     
    R. Robert Bell, Sep 10, 2003
    #2
  3. It did? I thought the filename had to be a FQN. Glad you found out
    different. Thanks.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | Thanks. I found (should have looked harder before posting) that you can
    use
    | the "..\" which means "From the folder of the host drawing, move up one
    | folder level and follow the specified path" This works in the VBA code
    for
    | the value of file variable in the following code"
    | Set insxref = ThisDrawing.ModelSpace.AttachExternalReference(file,
    blkname,
    | inspt, xsc, ysc, zsc, rot, True)
    |
    |
    | | > Change the Path property after the object is added. ;-)
    | >
    | >
    | > --
    | > R. Robert Bell, MCSE
    | > www.AcadX.com
    | >
    | >
    | > | > | I use the following code to attach an xref. With 2004 you can now
    have
    | > | relative xref paths, is it possible to use a relative path in VBA? If
    | so
    | > | how do I do it?
    | > |
    | > | Set insxref = ThisDrawing.ModelSpace.AttachExternalReference(file,
    | > blkname,
    | > | inspt, xsc, ysc, zsc, rot, False)
    | > |
    | > | Thanks,
    | > | Andrew
    | > |
    | > |
    | >
    | >
    |
    |
     
    R. Robert Bell, Sep 10, 2003
    #3
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.