Topic
  • 7 replies
  • Latest Post - ‏2013-11-18T08:46:39Z by rogerio.brito
rogerio.brito
rogerio.brito
5 Posts

Pinned topic How to change Label name of an OLE object

‏2013-11-12T12:59:24Z |

Hi everybody !

I inserted an ole object into DOORS through DXL script and now I need to know how to change its label name automatically.

For example: I have attached a PDF file as OLE object icon and DOORs called "Acrobat Document" as its label name. I need to change this to another name.

Anyone who knows how can I do this ?

Thanks a lot !

  • GregM_dxler
    GregM_dxler
    166 Posts

    Re: How to change Label name of an OLE object

    ‏2013-11-13T13:45:37Z  

    Right off hand:

    Double click on the object to get into edit mode.  Select the OLE object icon.  Right click, select OLE Object Properties. Select View tab. Select the Change Icon button. Chagne the name in the Label: field. Click OK and then OK.

    Should be a way to do it in dxl, but have not tried to do it.

    Hope this helps,

    Greg

  • rogerio.brito
    rogerio.brito
    5 Posts

    Re: How to change Label name of an OLE object

    ‏2013-11-13T15:09:59Z  

    Right off hand:

    Double click on the object to get into edit mode.  Select the OLE object icon.  Right click, select OLE Object Properties. Select View tab. Select the Change Icon button. Chagne the name in the Label: field. Click OK and then OK.

    Should be a way to do it in dxl, but have not tried to do it.

    Hope this helps,

    Greg

    Thanks, Greg.

    But I need to do this in DXL and I have tried many codes but nothing works. If you will  have any other idea how to do this, please, send to me.

    Thanks again.

    Rogerio

  • llandale
    llandale
    3035 Posts

    Re: How to change Label name of an OLE object

    ‏2013-11-13T18:30:05Z  

    Thanks, Greg.

    But I need to do this in DXL and I have tried many codes but nothing works. If you will  have any other idea how to do this, please, send to me.

    Thanks again.

    Rogerio

    The following is beyond me:

    [1] I see this command which doesn't help you as-is.

    • void     showOlePropertiesDialog(Object)
    • e,g,  showOlePropertiesDialog(current Object)

    But if you knew VooDoo you could probably find a way to cleverly "realize" instead of "show" the dialog above; adjust the "title" DBE and push the "save" or "OK" button on the dialog; then "Close".  I'm guessing doing so inside "eval_" has benefits.

    I note the context of the command is the "Object" which means, I guess, the 1st OLE in Object Text.  Editing some other OLE (2nd one in Text, or in some other attribute) would be a issue.  Perhaps find some empty temp Object; copy the OLE into its otherwise empty Object Text, modify it there, and copy it back.  Yuuck.

    I see no other relevant "properties" command anywhere in the doors.exe file.

    [2] I'm thinking there is this clumsy solution:

    • Copy OLE
    • Open MS-Word
    • Paste
    • command Word to change the title
    • Cut OLE in Word
    • delete existing OLE in DOORS
    • paste the new one.

    None of that looks easy, even surgically removing and replacing the OLE inside the Text.

    -Louie

  • rogerio.brito
    rogerio.brito
    5 Posts

    Re: How to change Label name of an OLE object

    ‏2013-11-14T08:13:43Z  
    • llandale
    • ‏2013-11-13T18:30:05Z

    The following is beyond me:

    [1] I see this command which doesn't help you as-is.

    • void     showOlePropertiesDialog(Object)
    • e,g,  showOlePropertiesDialog(current Object)

    But if you knew VooDoo you could probably find a way to cleverly "realize" instead of "show" the dialog above; adjust the "title" DBE and push the "save" or "OK" button on the dialog; then "Close".  I'm guessing doing so inside "eval_" has benefits.

    I note the context of the command is the "Object" which means, I guess, the 1st OLE in Object Text.  Editing some other OLE (2nd one in Text, or in some other attribute) would be a issue.  Perhaps find some empty temp Object; copy the OLE into its otherwise empty Object Text, modify it there, and copy it back.  Yuuck.

    I see no other relevant "properties" command anywhere in the doors.exe file.

    [2] I'm thinking there is this clumsy solution:

    • Copy OLE
    • Open MS-Word
    • Paste
    • command Word to change the title
    • Cut OLE in Word
    • delete existing OLE in DOORS
    • paste the new one.

    None of that looks easy, even surgically removing and replacing the OLE inside the Text.

    -Louie

    Thanks your reply, Louie.

    I try manually do the second suggestion but the DOORS rename the label name to "Acrobat Document" (in my case is a pdf file) when I cut in the word and paste in the DOORs.

    About the first suggestino I never use DBE technique. How can I do this ? Do you have any DXL example to send to me ?

    Thanks !

    Rogerio

  • Tony_Goodman
    Tony_Goodman
    271 Posts

    Re: How to change Label name of an OLE object

    ‏2013-11-15T12:00:21Z  

    The OLE Properties dialog is not written in DXL, so it is pretty likely that there is no way to do what you ask in DXL.

    So although you can launch the dialog using showOlePropertiesDialog(current Object), you will not be able to mess with it.

     

  • GregM_dxler
    GregM_dxler
    166 Posts

    Re: How to change Label name of an OLE object

    ‏2013-11-15T13:40:31Z  

    The OLE Properties dialog is not written in DXL, so it is pretty likely that there is no way to do what you ask in DXL.

    So although you can launch the dialog using showOlePropertiesDialog(current Object), you will not be able to mess with it.

     

    Well that makes sense as to why Louie and I couldn't find a command that would set the label.  It's got to be one of the few things that are not done in dxl (at least for the time being).

    Now all we need is to have the dxl launch the dialog box and then mimic the user input of selecting the View tab. Select the Change Icon button. Enter a new name in the Label: field and click the OK button.

    Thanks Tony,

    Greg

  • rogerio.brito
    rogerio.brito
    5 Posts

    Re: How to change Label name of an OLE object

    ‏2013-11-18T08:46:39Z  

    Well that makes sense as to why Louie and I couldn't find a command that would set the label.  It's got to be one of the few things that are not done in dxl (at least for the time being).

    Now all we need is to have the dxl launch the dialog box and then mimic the user input of selecting the View tab. Select the Change Icon button. Enter a new name in the Label: field and click the OK button.

    Thanks Tony,

    Greg

    thanks for all for reply.

    I am sad to hear that. On the other hand, I have problem with the showOlePropertiesDialog(current Object) too because I don't know how can I set another atribute to show the dialog. For example, if my OLE is in a third attribute called "Inputs" I can't use showOlePropertiesDialog(o."Inputs").

    If I change in the current attribute and move to another the label lost. Is there a way to fix this ?

     

    Thanks.