How to recreate the Object Heading and Text Column in a DXL Attribute

Greetings,
I am trying to recreate the Object Heading and Text Font Size in a DXL Attribute, but I can not find a way to do it.

Also does any one have the RTF Code at least for Font Size, Color and Style?

Thanks
SystemAdmin - Mon Aug 16 13:45:21 EDT 2010

Re: How to recreate the Object Heading and Text Column in a DXL Attribute
SystemAdmin - Thu Aug 19 08:18:13 EDT 2010

Still looking for a way. Any ideas?

Re: How to recreate the Object Heading and Text Column in a DXL Attribute
Peter_Albert - Thu Aug 19 08:38:24 EDT 2010

SystemAdmin - Thu Aug 19 08:18:13 EDT 2010
Still looking for a way. Any ideas?

Just do a google search on "recreate object heading and object text" :-)

The results point to Tony Goodmans http://www.smartdxl.com, with the following on the page DXL Scripts -> Layout DXL

The following layout DXL displays the object heading and text in the same format as the main column.

{//     Recreate Main Column in Layout DXL
 
/*
        Layout DXL to display the Object Heading and Text
        in the same format as the main column.

        Tony Goodman
*/
 
if (obj."Object Heading" "" != "")
{
        font(getCanvas, level(obj), HeadingsFont)
        displayRich(number(obj) " " obj."Object Heading" "")
}
 
if (obj."Object Text" "" != "")
{
        font(getCanvas, level(obj), TextFont)
        displayRich(richTextWithOle(obj."Object Text"))
}

 


Regards,

Peter

 

Re: How to recreate the Object Heading and Text Column in a DXL Attribute
SystemAdmin - Fri Aug 20 07:10:41 EDT 2010

Peter_Albert - Thu Aug 19 08:38:24 EDT 2010

Just do a google search on "recreate object heading and object text" :-)

The results point to Tony Goodmans http://www.smartdxl.com, with the following on the page DXL Scripts -> Layout DXL

The following layout DXL displays the object heading and text in the same format as the main column.

{//     Recreate Main Column in Layout DXL
 
/*
        Layout DXL to display the Object Heading and Text
        in the same format as the main column.

        Tony Goodman
*/
 
if (obj."Object Heading" "" != "")
{
        font(getCanvas, level(obj), HeadingsFont)
        displayRich(number(obj) " " obj."Object Heading" "")
}
 
if (obj."Object Text" "" != "")
{
        font(getCanvas, level(obj), TextFont)
        displayRich(richTextWithOle(obj."Object Text"))
}

 


Regards,

Peter

 

You need to be careful with 'getCanvas' as it sometimes causes dxl errors by appearing to be null. This happens when exporting amongst other things. You just need to put

if (!null(getCanvas))

before the font line to stop it from running when it is null.

I expanded on this in my code by saying if it was null i.e. when exporting, display the headings in bold (using rich text formatting), if not i.e. when displaying the text in a module, use getCanvas.

Simon

Re: How to recreate the Object Heading and Text Column in a DXL Attribute
SystemAdmin - Wed Aug 25 08:51:36 EDT 2010

SystemAdmin - Fri Aug 20 07:10:41 EDT 2010

You need to be careful with 'getCanvas' as it sometimes causes dxl errors by appearing to be null. This happens when exporting amongst other things. You just need to put

if (!null(getCanvas))

before the font line to stop it from running when it is null.

I expanded on this in my code by saying if it was null i.e. when exporting, display the headings in bold (using rich text formatting), if not i.e. when displaying the text in a module, use getCanvas.

Simon

Thank you very much for your answers.
That only works to display it in a Layout DXL and I need to display the font using a DXL Attribute (obj.attrDXLName = number(obj)" " obj."Object Heading""").

Re: How to recreate the Object Heading and Text Column in a DXL Attribute
Peter_Albert - Wed Aug 25 09:58:57 EDT 2010

SystemAdmin - Wed Aug 25 08:51:36 EDT 2010
Thank you very much for your answers.
That only works to display it in a Layout DXL and I need to display the font using a DXL Attribute (obj.attrDXLName = number(obj)" " obj."Object Heading""").

Sorry for overlooking that constraint in your original post.

I don't think you can modify the font used with DXL Attributes. The rich text control word for the font size would be \\fsN, where N is the font size in half-points. However, DOORS seems to ignore this control word when added to a rich text. Similarly for colours. Although you can use colours in rich Text dialog box elements (through usage of \\colortbl), colours are ignored in attribute columns.

Regards,

Peter