.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BindXrefs not working with CommandFlags.Session

1 REPLY 1
Reply
Message 1 of 2
AubelecBE
300 Views, 1 Reply

BindXrefs not working with CommandFlags.Session

hello. big prob..

 the command BindXrefs work fine if i use

<CommandMethod("ProgAR")> _

 

but not working if if use :

<CommandMethod("ProgAR", CommandFlags.Session)> _

 

in this i have added the lockdocument for all transaction.

 

but this code not work... :

                 If CollIdXref.Count > 0 Then
                    Try
                        dwg.Database.BindXrefs(CollIdXref, True)

                    Catch ex As Exception
                        okErr = True
                        MsgBox("Erreur lors de la liaison des Xref" & vbCrLf & "--> Essayer de lier le premier niveau", _
                                vbOKOnly & vbCritical, _
                                "Erreur Système")
                    End Try
                End If

 

i have adde this :

Dim LockDoc As DocumentLock = dwg.LockDocument

 

and after :

LockDoc.Dispose()
LockDoc = Nothing

 

 

but not working. the xref is not bind....

 

Anyone know why  ?

 

i dont catch exexption for lock error....

 

1 REPLY 1
Message 2 of 2
AubelecBE
in reply to: AubelecBE

HI i have added the trans.commit()  so the action of BindXref or Purge()  is valide and take effect....

 

 

Tnaks for me 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost