![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Export to Word as part of a script Topic Summary: Export module to Word after view is created. Created On: 16-Sep-2008 22:07 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I want to create a view of a module by filtering the objects and retaining specific columns and export that view to Word - all in a single dxl script.
I succeeded in creating the view. For exporting the view to Word, I use the following function as a part of my script: void exportDoc(DBE expWordDBE) { #include <\\standard\\export\\office\\word.dxl> print "Current view is exported to Word \n" } set(expWordDBE,exportDoc) // expWordDBE is a button on the GUI. I am getting a host of errors such as : -E- DXL: <utils/attrutil.inc:122> non local variable access (returnShortDateFormat) .... too many messages -- suspending error reporting-I- DXL: all done with 912 errors and 0 warnings Obviously there is a conflict with the declared variables in the include files associated with Export to Word file. If the file is used in isolation - that means just one line of code in the dxl window e.g: #include <\\standard\\export\\office\\word.dxl> - it works. But I want to initiate its action by a button on the GUI. How can I do it? - Krishna |
|
![]() |
|
![]() |
|
DXL does not follow the normal and intuitive rules for function nesting. The only outside variables a sub-function may access are those defined in the main program, then cannot access variables defined within a function, even when the sub-function is defined inside the function. The attached demonstrates the error; it doesn't complain about using global variable 'i' inside sub-function f2, but it does complain about using function f1's declared variable j.
Thus, as far as I know, I've never used a nested sub-function but I digress. The #include file you are using obviously has some global variables defined which its functions use. By putting the #include inside your exportDoc() function, the nested functions are now accessing variables that are no longer defined in the main program, thus you are getting the errors. Don't know what to do about it, but you could probably figure out how to specify word.dxl to run as an eval_ string, but you may need to insert some clever code at the top to insure its using the correct 'current Module'. - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Export to Word as part of a script
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.