Valued Contributor
Posts: 75
Registered: ‎09-14-2009
Message 1 of 2 (129 Views)

read from xref

129 Views, 1 Replies
10-23-2012 11:11 PM

I've written some code voor C3D R2010 and all has worked fine without errors. In C3D R2013 I get numerous errors.

Now I have an error when I want to read info from an x-reffed file.

When executing the code db.ReadDwgFile(tekening, IO.FileShare.Read, True, "")

Autocad gives a Fatal Error



See code


hlp = "C:\magweg\8859 4a GRONDPLAN CIVIL.dwg"
if zoekkaders (hlp) then ...


    Public Function zoekkaders(ByVal tekening As String) As Boolean
        Dim myDWG As ApplicationServices.Document
        Dim myEd As EditorInput.Editor
        Dim myBlock As DatabaseServices.BlockReference
        myDWG = ApplicationServices.Application.DocumentManager.MdiActiveDocument
        myEd = myDWG.Editor
        Dim db As New DatabaseServices.Database
        If tekening <> "basis" Then db.ReadDwgFile(tekening, IO.FileShare.Read, True, "") Else db = myDWG.Database

ADN Support Specialist
Posts: 666
Registered: ‎03-21-2011
Message 2 of 2 (93 Views)

Re: read from xref

10-29-2012 10:05 AM in reply to: fallright

I suggest asking this question in the Discussion group for Civil3d Customization.



I am sure you will get an answer there.

Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community