Topic
2 replies Latest Post - ‏2013-01-23T14:45:38Z by DXLUser
DXLUser
DXLUser
22 Posts
ACCEPTED ANSWER

Pinned topic DXL Attribute

‏2013-01-22T14:54:42Z |

Hi everyone,

I have an object that has object Heading, Object Text and a figure all in one object. I am trying to copy this object into a DXL attribute using:

void copy_Value_From_To(Object trg, Object src, string targAttName, string srcAttName){
                set(trg.targAttName,src.srcAttName)
                }
                copy_Value_From_To(obj,obj,"DXL Attribute","Object Text")

 


Only the object text and figure get copied, what can I do to have the object heading copied along with everything else in that object?

I'm not sure if richTextWithOle will do the work? don't really know how to use it :-( can someone give me some ideas of the best way to go about it. Any ideas will much be appreciated.

 

Updated on 2014-01-06T14:02:59Z at 2014-01-06T14:02:59Z by iron-man
  • llandale
    llandale
    2939 Posts
    ACCEPTED ANSWER

    Re: DXL Attribute

    ‏2013-01-22T19:18:18Z  in response to DXLUser

    I think you want both the Heading and the Text into a DXL-Attribute.

    That "set" command won't work. Perhaps this scribbling:

    Buffer buf = create()
    buf += number(obj)    // Paragraph Number
    buf += "\t"
    buf += richText(obj."Object Heading")
    buf += "\n"
    buf += richTextWithOle(obj."Object Text")
    obj.attrDXLName = richText(tempStringOf(buf))
    delete(buf)
    


    Yes, variable "attrDXLName" is the name of the target attribute, and is generally better than hard-coding it.

    -Louie

    Updated on 2014-01-06T14:03:13Z at 2014-01-06T14:03:13Z by iron-man