Cannot insert module attribute as a column

Hi everyone,

does anyone know how do this error happen?

-R-E- DXL: <Line:424> Cannot insert module attribute (LK_Technologie) as a column.

Backtrace:

<Line:507>

<Line:572>

<Line:766>

<Line:939>

In line 424 is: attribute(targetCol, attName) which set attribute name to column.

Thanks in advance,

 


Jonny Tim - Wed Apr 10 07:58:04 EDT 2019

Re: Cannot insert module attribute as a column
Mike.Scharnow - Wed Apr 10 11:44:13 EDT 2019

Hi Jonny!

I am not really sure about the question you have. The error message is clear: you cannot insert a module attribute as a column, and LK_Technologie obviously is a module attribute, not an object attribute.

Note that "attribute (targetCol, attName)" does not set the name of the column, but it tells the column to display the attribute LK_Technologie.

Regards,
Mike

Re: Cannot insert module attribute as a column
Jonny Tim - Wed Apr 10 12:15:39 EDT 2019

Hi, Mike

Sorry for the misunderstand. The attribute LK_Technologie is not a module attribute. It is a object attribute. Therefore, I really don't understand the complier error.

Re: Cannot insert module attribute as a column
Mike.Scharnow - Wed Apr 10 16:04:43 EDT 2019

Jonny Tim - Wed Apr 10 12:15:39 EDT 2019

Hi, Mike

Sorry for the misunderstand. The attribute LK_Technologie is not a module attribute. It is a object attribute. Therefore, I really don't understand the complier error.

Hi Jonny,

that must be a really strange bug. I just tested it again with DOORS 9.6.1.11, and the "attribute" command behaved exactly as intended:

Column c = insert (column 1)
attribute (c, "Att1")  // object attribute. Was inserted
Column d = insert (column 1)
attribute (d, "Att2") // module attribute. Throws the error
Column e = insert (column 1)
attribute (e, "Att3") // attribute that exists as object and module attribute. Object attribute was inserted

perhaps you should double check the attribute definition in your module, Maybe LK_Technologie is an object attribute in most of your modules but not in this special one?

AttrDef ad = find (current Module, "ComponentType")
if ad.object then print "the attribute exists on object level\n"
if ad.module then print "teh attribute exists on module level\n"

 

Or there is a nasty bug in the DOORS version that you use. In this case, you should contact IBM support

 

 

Re: Cannot insert module attribute as a column
llandale - Sun Apr 14 02:26:52 EDT 2019

Mike is correct.
I'm going to take some stabs in the dark:

o you have not yet inserted the "Column"
o print "curr module = " fullName(current Module)  "\n"
o the column is already defined as the "main" column.

o you lack "R" rights to the attrdef, or the attfval.
-Louie