xref info without open drawing

xref info without open drawing

Anonymous
Not applicable
351 Views
2 Replies
Message 1 of 3

xref info without open drawing

Anonymous
Not applicable
hello
it is possible, to get xref information from a drawing (paths of xref) WITHOUT open the drawing.

at present i open drawings get the required date and than close the drawing with a for - next loop. open / close need many times and resources.

also, how can i change the xref path with vba?
0 Likes
352 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
to change the path to an Xref you need to access a blockreference and change the path property

--- to find the blockreference
let blockname be the name of you xref

For Each Obj In ThisDrawing.ModelSpace
If Obj.ObjectName = "AcDbBlockReference" Then
If LCase(Obj.Name) = LCase(blockname) Then
Set BlockRef = obj
exit for
end if
end if
next

''' then you can change the path
BlockRef.Path = newPath
0 Likes
Message 3 of 3

Anonymous
Not applicable
thank you
0 Likes