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

Open drawing - commandflag.session - there is no sourcecode for this location

1 REPLY 1
SOLVED
Reply
Message 1 of 2
wbdehaan
441 Views, 1 Reply

Open drawing - commandflag.session - there is no sourcecode for this location

Hi,

 

When opening a drawing I have errors:

1. the drawing is opened, but it freezes during open-command, and is not activated, OR

2. the drawing is opened, but I cannot start the program a second time, then it gives an error.

 

explanation:

 

I have a project with an attached large 'common' project, which I attached with "menu file > add > exisiting project" in VB2008express:

 

Solution 'CNC' (2 projects)

- CommonMacro   (>>added project)

    - cad.vb

- CNC    (>> main project)

    - main.vb

 

 

1. When I open a drawing, first it freezed during this open-command, and did not activate this drawing. Only after clicking right mouse button, it continued the program, activated the drawing. But this is no option for me.

---

<CommandMethod("CNCP")>Public Sub StartProgrammaProductie()

 

    cad.init    (>> routine in commonmacro-project)

 

    Dim acDocMgr As DocumentCollection = Application.DocumentManager

    Dim Nieuwbestand as document

    NieuwBestand = acDocMgr.Open(Pad_en_Bestand, BestandsInfo.IsReadOnly)   (>>>FREEZE)

    acDocMgr.MdiActiveDocument = NieuwBestand

end sub

---

 

 

2. I added commandflag.session to the subroutine, the first time I use "CNCP" the drawing is opened fine, but now when the second time I start my program and a drawing is opened, it loses contact with the common project

---

<CommandMethod("CNCP", CommandFlags.Session)>Public Sub StartProgrammaProductie()

 

    cad.init     (>> ERROR: there is no sourcecode for this location)

 

    Dim acDocMgr As DocumentCollection = Application.DocumentManager

    Dim Nieuwbestand as document

    NieuwBestand = acDocMgr.Open(Pad_en_Bestand, BestandsInfo.IsReadOnly)

acDocMgr.MdiActiveDocument = NieuwBestand

end sub

---

 

How can I open and activate drawing's and still have connection to the common project dll? 

or how do I end a routine properly?

 

kind regards

 

Wouter de Haan

 

 

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

Hi there,

 

solved my problem by turning the GUI.Showdialog to GUI.show

 

Wouter

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