hasCopyableTableAttributes

We are currently using DOORS version 9.0.0.0. I am currently testing our DXL scripts in DOORS version 9.3.0.7.

In one of our customized scripts, we call the old Telelogic include file "word.inc".

In word.inc, there is a function called (void wordDumpTableAttributeVBA(Object o)) that has the following start to an "if" statement: if (!hasCopyableTableAttributes(o))

The word.inc include file works in DOORS 9.0.0.0 but I get the following error when I try to run it in 9.3.0.7.

Is hasCopyableTableAttributes(o) no longer a valid DOORS function in version 9.3.0.7?

Is there a substitute for the Telelogic "word.inc" file?

************************************************************************************

  • DXL: <R:\working\DXL\ole_functions\word.inc:1641> incorrect argument for (!)
Included from:
<R:\working\DXL\modules\baselineCompare2.inc:38>
<R:\working\DXL\modules\baselineCompareExplorer.dxl:25>
<Line:1>
-E- DXL: <R:\working\DXL\ole_functions\word.inc:1641> incorrectly concatenated tokens
Included from:
<R:\working\DXL\modules\baselineCompare2.inc:38>
<R:\working\DXL\modules\baselineCompareExplorer.dxl:25>
<Line:1>
-E- DXL: <R:\working\DXL\ole_functions\word.inc:1641> undeclared variable (hasCopyableTableAttributes)
Included from:
<R:\working\DXL\modules\baselineCompare2.inc:38>
<R:\working\DXL\modules\baselineCompareExplorer.dxl:25>
<Line:1>
-E- DXL: <R:\working\DXL\ole_functions\word.inc:1641> incorrect arguments for (if)
Included from:
<R:\working\DXL\modules\baselineCompare2.inc:38>
<R:\working\DXL\modules\baselineCompareExplorer.dxl:25>
<Line:1>
-I- DXL: All done. Errors reported: 4. Warnings reported: 0.

************************************************************************************

Thanks for any help.
SarahW - Mon Apr 30 13:27:46 EDT 2012

Re: hasCopyableTableAttributes
llandale - Mon Apr 30 14:45:36 EDT 2012

This is what happens when you depend on "undocumented" software, its subject to change; tough luck for you. Someone at my company had the same issue.

There is this function in the new itfutil.inc"
  • bool hasCopyableTableAttribute(Object o, string attributeName)
  • {
  • return (canRead o) && (!null attributeName) && canRead(o.attributeName)
  • }
  • // notice it's name lacks a trailing "s".
which is called from the new word.inc.

-Louie

Re: hasCopyableTableAttributes
JeanetteKreutner - Tue May 15 20:37:55 EDT 2012

llandale - Mon Apr 30 14:45:36 EDT 2012
This is what happens when you depend on "undocumented" software, its subject to change; tough luck for you. Someone at my company had the same issue.

There is this function in the new itfutil.inc"

  • bool hasCopyableTableAttribute(Object o, string attributeName)
  • {
  • return (canRead o) && (!null attributeName) && canRead(o.attributeName)
  • }
  • // notice it's name lacks a trailing "s".
which is called from the new word.inc.

-Louie

Thanks for this post. We had several scripts that had this function call and now they work again

Re: hasCopyableTableAttributes
njsmith - Sat Oct 13 23:56:49 EDT 2012

llandale - Mon Apr 30 14:45:36 EDT 2012
This is what happens when you depend on "undocumented" software, its subject to change; tough luck for you. Someone at my company had the same issue.

There is this function in the new itfutil.inc"

  • bool hasCopyableTableAttribute(Object o, string attributeName)
  • {
  • return (canRead o) && (!null attributeName) && canRead(o.attributeName)
  • }
  • // notice it's name lacks a trailing "s".
which is called from the new word.inc.

-Louie

We're having the same issue:

-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect argument for (!)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrectly concatenated tokens
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> undeclared variable (hasCopyableTableAttributes)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect arguments for (if)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-I- DXL: All done. Errors reported: 4. Warnings reported: 0

At first I commented out the hasCopyableTableAttributes per someone's recommendation but it is called by wordDumpTableAttributeVBA and when I reran, got these errors:

-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1857> incorrectly concatenated tokens
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1857> undeclared variable (wordDumpTableAttributeVBA)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-I- DXL: All done. Errors reported: 2. Warnings reported: 0

Then I saw your post, Louie, so I uncommented it and just removed the trailing s. Now I get these errors:

-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect argument for (!)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect arguments for function (hasCopyableTableAttribute)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect arguments for (if)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-I- DXL: All done. Errors reported: 3. Warnings reported: 0.

I'm sure this would be easier to debug if I was a Programmer. :-)

Here is that piece of the program:

//Function to dump the Object text or table cell value
void wordDumpTableAttributeVBA(Object o)
{
string errMess = ""
if (!hasCopyableTableAttribute(o))
{
return
}
string attribName = o.(reserved AMainColumnAttribute)
Buffer textBuffer = create
probeRichAttr_(o,attribName,textBuffer,true)
if (0 < length textBuffer) {
if (issueWarnings && containsUnregisteredOle(o.attribName)) {
warningBox "Object " (identifier o) " contains one or more unregistered OLE objects in '" attribName "'.\n\nThese OLE objects will be exported as pictures."
}
errMess = applyStyleLockPasteInvoke(objSel, richText tempStringOf textBuffer, getStyleForAttribute(o, attribName))
}
delete(textBuffer)
if (!null errMess)
{
logError("Error pasting attribute '"attribName"' of cell", errMess, o)
}
collapseSelection
vbaCheckRes(oleMethod(objSel, cMethodTypeBackspace))
}

Re: hasCopyableTableAttributes
llandale - Mon Oct 15 15:18:00 EDT 2012

njsmith - Sat Oct 13 23:56:49 EDT 2012
We're having the same issue:

-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect argument for (!)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrectly concatenated tokens
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> undeclared variable (hasCopyableTableAttributes)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect arguments for (if)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-I- DXL: All done. Errors reported: 4. Warnings reported: 0

At first I commented out the hasCopyableTableAttributes per someone's recommendation but it is called by wordDumpTableAttributeVBA and when I reran, got these errors:

-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1857> incorrectly concatenated tokens
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1857> undeclared variable (wordDumpTableAttributeVBA)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-I- DXL: All done. Errors reported: 2. Warnings reported: 0

Then I saw your post, Louie, so I uncommented it and just removed the trailing s. Now I get these errors:

-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect argument for (!)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect arguments for function (hasCopyableTableAttribute)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect arguments for (if)
Included from:
<C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
<Line:1>
-I- DXL: All done. Errors reported: 3. Warnings reported: 0.

I'm sure this would be easier to debug if I was a Programmer. :-)

Here is that piece of the program:

//Function to dump the Object text or table cell value
void wordDumpTableAttributeVBA(Object o)
{
string errMess = ""
if (!hasCopyableTableAttribute(o))
{
return
}
string attribName = o.(reserved AMainColumnAttribute)
Buffer textBuffer = create
probeRichAttr_(o,attribName,textBuffer,true)
if (0 < length textBuffer) {
if (issueWarnings && containsUnregisteredOle(o.attribName)) {
warningBox "Object " (identifier o) " contains one or more unregistered OLE objects in '" attribName "'.\n\nThese OLE objects will be exported as pictures."
}
errMess = applyStyleLockPasteInvoke(objSel, richText tempStringOf textBuffer, getStyleForAttribute(o, attribName))
}
delete(textBuffer)
if (!null errMess)
{
logError("Error pasting attribute '"attribName"' of cell", errMess, o)
}
collapseSelection
vbaCheckRes(oleMethod(objSel, cMethodTypeBackspace))
}

You should probably get in the habit of saving the "dxl" folder of each installed DOORS client,
  • e.g. folder "Doors_v9001_DXL"
So when you are using these functions that no longer work you can go track them down and add them to your code.

-Louie

Re: hasCopyableTableAttributes
SarahW - Tue Oct 16 13:24:19 EDT 2012

Thank you, your answer works.

Re: hasCopyableTableAttributes
njsmith - Tue Oct 16 18:25:16 EDT 2012

llandale - Mon Oct 15 15:18:00 EDT 2012
You should probably get in the habit of saving the "dxl" folder of each installed DOORS client,

  • e.g. folder "Doors_v9001_DXL"
So when you are using these functions that no longer work you can go track them down and add them to your code.

-Louie

Good idea, Louie.
FYI...I actually went back and commented out just the "hasCopyableTableAttribute" section of the wordDumpTableAttributeVBA function and it works fine now.