Relative Path Xref's

Relative Path Xref's

Anonymous
Not applicable
556 Views
3 Replies
Message 1 of 4

Relative Path Xref's

Anonymous
Not applicable
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
0 Likes
557 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Change the Path property after the object is added. 😉


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


"Andrew W. Schmidt" wrote in message
news:[email protected]...
| 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
|
|
0 Likes
Message 3 of 4

Anonymous
Not applicable
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)


"R. Robert Bell" wrote in message
news:[email protected]...
> Change the Path property after the object is added. 😉
>
>
> --
> R. Robert Bell, MCSE
> www.AcadX.com
>
>
> "Andrew W. Schmidt" wrote in message
> news:[email protected]...
> | 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
> |
> |
>
>
0 Likes
Message 4 of 4

Anonymous
Not applicable
It did? I thought the filename had to be a FQN. Glad you found out
different. Thanks.

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


"Andrew W. Schmidt" wrote in message
news:[email protected]...
| 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)
|
|
| "R. Robert Bell" wrote in message
| news:[email protected]...
| > Change the Path property after the object is added. 😉
| >
| >
| > --
| > R. Robert Bell, MCSE
| > www.AcadX.com
| >
| >
| > "Andrew W. Schmidt" wrote in message
| > news:[email protected]...
| > | 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
| > |
| > |
| >
| >
|
|
0 Likes