george seifert Posted September 11, 2008 Report Share Posted September 11, 2008 I got a nasty surprise when I tried to open a VI that uses the Report Generation Toolkit to access a table in Word. The Generate Report Get Data to Modify and Generate Report Set Modified Data aren't part of the toolkit anymore. The NI site has some info and I've tried to follow their examples, but I'm just not getting it. Supposedly now I have to use LVclass stuff to access what I need. I haven't tried to use LVclasses yet, and don't have a lot of time to learn a whole new set of tools. Could someone show me how to modify the attached really simple VI that counts the number of tables in a Word doc? Mostly I just need to know how to get access to Word.Tables. Download File:post-2786-1221055973.vi Thanks, George Quote Link to comment
mross Posted September 11, 2008 Report Share Posted September 11, 2008 QUOTE (george seifert @ Sep 10 2008, 10:13 AM) I got a nasty surprise when I tried to open a VI that uses the Report Generation Toolkit to access a table in Word. The Generate Report Get Data to Modify and Generate Report Set Modified Data aren't part of the toolkit anymore. The NI site has some info and I've tried to follow their examples, but I'm just not getting it. Supposedly now I have to use LVclass stuff to access what I need. I haven't tried to use LVclasses yet, and don't have a lot of time to learn a whole new set of tools. Could someone show me how to modify the attached really simple VI that counts the number of tables in a Word doc? Mostly I just need to know how to get access to Word.Tables. http://lavag.org/old_files/post-2786-1221055973.vi'>Download File:post-2786-1221055973.vi Thanks, George George, With the introduction (forced injection?) of Word 2007, it is again very necessary to mention what versions of Word are in play. Word 2007 doesn't play well even with previous versions of Word. Sorry, but I have no actual wisdom re your troubles. Mike Quote Link to comment
george seifert Posted September 11, 2008 Author Report Share Posted September 11, 2008 QUOTE (mross @ Sep 10 2008, 11:28 AM) George, With the introduction (forced injection?) of Word 2007, it is again very necessary to mention what versions of Word are in play. Word 2007 doesn't play well even with previous versions of Word. Sorry, but I have no actual wisdom re your troubles. Mike I'm using Word 2003. I'm pretty sure the Word version isn't an immediate problem here. It's more that they introduced objects into play here where there weren't any before. I figured I had no real use for OOP since I don't do multiperson projects and most of my apps aren't all that big. I don't think it's fair that they expect me to program in OOP just to fix a VI that they broke. George Quote Link to comment
LAVA 1.0 Content Posted September 11, 2008 Report Share Posted September 11, 2008 QUOTE (george seifert @ Sep 10 2008, 10:13 AM) I got a nasty surprise when I tried to open a VI that uses the Report Generation Toolkit to access a table in Word. The Generate Report Get Data to Modify and Generate Report Set Modified Data aren't part of the toolkit anymore. The NI site has some info and I've tried to follow their examples, but I'm just not getting it. Supposedly now I have to use LVclass stuff to access what I need. I haven't tried to use LVclasses yet, and don't have a lot of time to learn a whole new set of tools. Could someone show me how to modify the attached really simple VI that counts the number of tables in a Word doc? Mostly I just need to know how to get access to Word.Tables. http://lavag.org/old_files/post-2786-1221055973.vi'>Download File:post-2786-1221055973.vi Thanks, George At first look its seems that we can't add function to the Word toolkit because the NI_Word.lvclass (LabVIEW 8.6\vi.lib\Utility\NIReport.llb\Word) is locked. The class implementation lock the access to the Word ActiveX. That's a very bad news since I made some custom function in some of my old project and I would not be able upgrade it in 8.6 Dany Quote Link to comment
Doug Norman Posted September 11, 2008 Report Share Posted September 11, 2008 QUOTE (george seifert @ Sep 10 2008, 11:37 AM) I'm using Word 2003. I'm pretty sure the Word version isn't an immediate problem here. It's more that they introduced objects into play here where there weren't any before. I figured I had no real use for OOP since I don't do multiperson projects and most of my apps aren't all that big. I don't think it's fair that they expect me to program in OOP just to fix a VI that they broke.George Hi George, Let me first say there is an easy work around for this. If you search ni.com for "report generation kb" you should find: http://digital.ni.com/public.nsf/allkb/8D2...62574B000534AF5 which explains what to do. The basic idea is to edit one of the existing VIs (Get Report Type) to output the references you need. You do not need to know anything about LVOOP or classes. And hopefully I can clear up a couple things in this thread: 1. When we (NI) make changes to a toolkit, we guarantee the palette VIs. SubVIs not on the palette are subject to be changed or removed. That said, we don't want or try to break your application. We will likely add some utility VIs to the palette in the future to allow access to the Word and Excel references without having to edit the existing toolkit VIs. 2. It is true that you cannot add VIs to the to the NI_Word,lvclass or the NI_Excel.lvclass. It is false that the class implementation blocks access to the Word and Excel ActiveX – you can get to the references as described in the KB link above. 3. While you cannot add VIs to the classes, you can edit the VIs in the classes. However, please remember that when you do this, you need to be aware that installing the next version will replace your edited VIs. Hope this helps, Doug Norman Quote Link to comment
LAVA 1.0 Content Posted September 12, 2008 Report Share Posted September 12, 2008 QUOTE (Doug Norman @ Sep 10 2008, 03:28 PM) Hi George,Let me first say there is an easy work around for this. If you search ni.com for "report generation kb" you should find: http://digital.ni.com/public.nsf/allkb/8D2...62574B000534AF5 which explains what to do. The basic idea is to edit one of the existing VIs (Get Report Type) to output the references you need. You do not need to know anything about LVOOP or classes. And hopefully I can clear up a couple things in this thread: 1. When we (NI) make changes to a toolkit, we guarantee the palette VIs. SubVIs not on the palette are subject to be changed or removed. That said, we don't want or try to break your application. We will likely add some utility VIs to the palette in the future to allow access to the Word and Excel references without having to edit the existing toolkit VIs. 2. It is true that you cannot add VIs to the to the NI_Word,lvclass or the NI_Excel.lvclass. It is false that the class implementation blocks access to the Word and Excel ActiveX – you can get to the references as described in the KB link above. 3. While you cannot add VIs to the classes, you can edit the VIs in the classes. However, please remember that when you do this, you need to be aware that installing the next version will replace your edited VIs. Hope this helps, Doug Norman Thank you Doug for the link, but I can't download the workaround.zip the link to the file is not working. Dany Quote Link to comment
Doug Norman Posted September 12, 2008 Report Share Posted September 12, 2008 QUOTE (daal @ Sep 10 2008, 05:56 PM) Thank you Doug for the link, but I can't download the workaround.zip the link to the file is not working.Dany I just tried and was able to download the workaround.zip file, so I have attached it here. Thanks, Doug Quote Link to comment
LAVA 1.0 Content Posted September 12, 2008 Report Share Posted September 12, 2008 Thank you Doug Dany Quote Link to comment
george seifert Posted September 16, 2008 Author Report Share Posted September 16, 2008 QUOTE (Doug Norman @ Sep 10 2008, 02:28 PM) Hi George,Let me first say there is an easy work around for this. If you search ni.com for "report generation kb" you should find: http://digital.ni.com/public.nsf/allkb/8D2...62574B000534AF5 which explains what to do. The basic idea is to edit one of the existing VIs (Get Report Type) to output the references you need. You do not need to know anything about LVOOP or classes. Doug Norman I downloaded the example, but it's broken. I can't figure out how to get it to work. I've been messing with it for quite a while now and am feeling really stupid. I just can't understand how to get the correct Get Report Type VI in there. When I double click on the Get Report Type VI in the example VI it brings up a dialog asking which implementation to load. I figured that the NI_Word one makes the most sense. That VI comes up broken with this explanation "This VI doesn't match other VIs in the method, Connector Pane Terminal(s) are different. All VIs that implement a method of a LabVIEW class must match Connector Panes. To correct this, compare Connector Pane of both this VI and the VI of an ancestor class that implements this method." What the heck does that mean? Maybe I'm making this too hard. Sure seems like I need a knowledge of LVOOP to get this going. Any help to get me further along would be appreciated. George Quote Link to comment
LAVA 1.0 Content Posted September 16, 2008 Report Share Posted September 16, 2008 QUOTE (george seifert @ Sep 15 2008, 12:18 PM) I downloaded the example, but it's broken. I can't figure out how to get it to work. I've been messing with it for quite a while now and am feeling really stupid. I just can't understand how to get the correct Get Report Type VI in there. When I double click on the Get Report Type VI in the example VI it brings up a dialog asking which implementation to load. I figured that the NI_Word one makes the most sense. That VI comes up broken with this explanation"This VI doesn't match other VIs in the method, Connector Pane Terminal(s) are different. All VIs that implement a method of a LabVIEW class must match Connector Panes. To correct this, compare Connector Pane of both this VI and the VI of an ancestor class that implements this method." What the heck does that mean? Maybe I'm making this too hard. Sure seems like I need a knowledge of LVOOP to get this going. Any help to get me further along would be appreciated. George Hi George, The exemple VI will work if you copy the "NIReport.llb" folder in <labview 8.6>\vi.lib\Utility, this will replace all implementation of the "Get Report Type.vi" to be able to access the Word._Document activeX. There is an exemple of the implementation of the Get Tables Count. http://lavag.org/old_files/post-223-1221499285.zip'>Download File:post-223-1221499285.zip I hope this will help Dany Quote Link to comment
george seifert Posted September 16, 2008 Author Report Share Posted September 16, 2008 QUOTE (daal @ Sep 15 2008, 12:22 PM) Hi George,The exemple VI will work if you copy the "NIReport.llb" folder in <labview 8.6>\vi.lib\Utility, this will replace all implementation of the "Get Report Type.vi" to be able to access the Word._Document activeX. Dany Thanks for the help. I downloaded your example and the Word-GetTableCount VI is broken. Where am I supposed to copy the "NIReport.llb" folder to? George Quote Link to comment
LAVA 1.0 Content Posted September 16, 2008 Report Share Posted September 16, 2008 QUOTE (george seifert @ Sep 15 2008, 01:55 PM) Where am I supposed to copy the "NIReport.llb" folder to? In the workaround.zip you have an example and a NIReport.llb folder, copy this NIReport.llb folder to <labview 8.6>\vi.lib\Utility. You have already NIReport.llb folder in the <labview 8.6>\vi.lib\Utility that contain the complet tookit. The workaround VI will replace all instance of "Get Report Type.vi" and with this version you will be able to access Word._document activeX Dany Quote Link to comment
george seifert Posted September 16, 2008 Author Report Share Posted September 16, 2008 QUOTE (daal @ Sep 15 2008, 02:18 PM) Don't replace the entire NIReport.llb you just need to overwrite all instance of Get Report Type.vi (In HTLM, Word, Excel, Standard Report subfolder) Those file have the same name but are specific to each Report Type. I finally got it going. All I needed was some really simple instructions. The KB on this is really confusing. If it just said copy these files to these locations I would have been done two days ago. Anyway, thanks for the help. George 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.