using backgroundworker get xref file names

using backgroundworker get xref file names

Anonymous
Not applicable
406 Views
2 Replies
Message 1 of 3

using backgroundworker get xref file names

Anonymous
Not applicable

Hi,

 

working on backgoundworker using autocad library dll. need to get xreffiles from a file where I need to use database services. I am not able to get databaseservices please suggest what dlls required to be added to get xref names from file.

 

Thanks

Haritha

0 Likes
407 Views
2 Replies
Replies (2)
Message 2 of 3

ActivistInvestor
Mentor
Mentor

@Anonymous wrote:

Hi,

 

working on backgoundworker using autocad library dll. need to get xreffiles from a file where I need to use database services. I am not able to get databaseservices please suggest what dlls required to be added to get xref names from file.

 

Thanks

Haritha


You cannot use the AutoCAD .NET API from a BackgroundWorker (or from any thread started by your code), because a great deal of the API is not thread-safe.

0 Likes
Message 3 of 3

Anonymous
Not applicable

BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead)
                    as BlockTable;
                    foreach (ObjectId btrId in bt)
                    {
                        BlockTableRecord btr = tr.GetObject(btrId, OpenMode.ForRead)
                        as BlockTableRecord;
                        if (btr.IsFromExternalReference)
                        {
                            btr.UpgradeOpen();
                            String oldPath = btr.PathName;

 

how to get this xref path name by using backgroundworker. how to get blocktable.

 

Please reply if anyone already done.

 

Thanks

Y.Haritha

0 Likes