LAVA 1.0 Content Posted January 23, 2008 Report Share Posted January 23, 2008 Using LV to open and work with MS applications is no problem. I can create a new docuiment & save it.. I need to bring the Word application to the Front and keep it there until it (Word) is closed by an Operator. Upon closing the LV application needs to detect that it is closed and trigger an event (more actions). My questions are: 1. How do you bring the MS Word to the Front and keep it there. I'm using an Event Structure, and there are no events occurring after the document is completed... However, about mid-way through the document, the Front Panel (VI) goes to the Front.. I have set FP.IsFrontMost to FALSE before / after editing the MS Word document... It just doesn't want to stay at the front. 2. After the Operator looks at the report, he closes it. Closing the report must trigger an event. Is there an easier way than registering a User Event and then triggering on that? If this is the way to go, I would need help with User Events... Thanks, JLV Quote Link to comment
Ton Plomp Posted January 24, 2008 Report Share Posted January 24, 2008 QUOTE(JoeLabview @ Jan 22 2008, 07:42 PM) 1. How do you bring the MS Word to the Front and keep it there. I'm using an Event Structure, and there are no events occurring after the document is completed... However, about mid-way through the document, the Front Panel (VI) goes to the Front.. I have set FP.IsFrontMost to FALSE before / after editing the MS Word document... It just doesn't want to stay at the front.2. After the Operator looks at the report, he closes it. Closing the report must trigger an event. Is there an easier way than registering a User Event and then triggering on that? If this is the way to go, I would need help with User Events... Thanks, JLV The second part should be done with an ActiveX callback, I have implemented such for the NI report generation toolkit, to warn the user NOT to close the workbook, from there you could send user event. Ton Quote Link to comment
LAVA 1.0 Content Posted January 24, 2008 Author Report Share Posted January 24, 2008 QUOTE(tcplomp @ Jan 23 2008, 07:02 AM) The second part should be done with an ActiveX callback, I have implemented such for the NI report generation toolkit, to warn the user NOT to close the workbook, from there you could send user event.Ton Thanks Ton, Working on it using callback.. How do you genenrate a trigger from the Strictly Typed VI created by the Reg Event Callback? It's hard to describe what I'm trying to do. So with reference to attached image, pretend that the event "create report" is one of the state in the Event Structure and "VI Activation" is another event in the same structure. How do I get the bottom one to trigger only from the User Event (Word closing) from the one pictured above it? The reference in the top one is for the VI at the bottom. I realize VI Activation is probably not the event to choose.. Since the VI being referenced by the Strict Type does not allow to change the connector pane (ie add terminals), how do I trigger a LV event within the Event Structure.. This would be easier to explain with a mind-meld.. I can open word, close it and it triggers the event to execute the VI referenced... that works.. I need to get it to trigger the next step. Many Thanks RayR Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.