Block Path

Block Path

Anonymous
Not applicable
282 Views
2 Replies
Message 1 of 3

Block Path

Anonymous
Not applicable
Hello,

I am trying to edit the xref path in a DWG files.

dbxDoc.Open @"D:\AutoCad_Registered\FilesDWG\Hummer.DWG",Type.Missing);

foreach(AcadBlock Block in dbxDoc.Blocks)
{
if(Block.IsXRef)
{
Cosnole.WriteLine(Block.Name)
}
}

With ObjectDBX, the Block has not a property named "Path" , do you from which object i can access this property ?

thanks in advance,

Nicolas
0 Likes
283 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Here is the VBA code I use to get the paths from xrefs

Dim objFileDependencies As AcadFileDependency
For Each objFileDependencies In ThisDrawing.FileDependencies
If objFileDependencies.Feature = "Acad:XRef" Or
objFileDependencies.Feature = "Acad:Image" Then
fgSource = objFileDependencies.FullFileName
fgDestination = TxtDistinationFolder & "\" &
objFileDependencies.FileName
FileCopy fgSource, fgDestination
End If
Next

Hope this helps

Bill.


wrote in message news:4875149@discussion.autodesk.com...
Hello,

I am trying to edit the xref path in a DWG files.

dbxDoc.Open @"D:\AutoCad_Registered\FilesDWG\Hummer.DWG",Type.Missing);

foreach(AcadBlock Block in dbxDoc.Blocks)
{
if(Block.IsXRef)
{
Cosnole.WriteLine(Block.Name)
}
}

With ObjectDBX, the Block has not a property named "Path" , do you from
which object i can access this property ?

thanks in advance,

Nicolas
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks four your help Bill,

I managed to set to set the path of my XREF.

Thanks.

Nicolas
0 Likes