Doors: Edit OLE using DXL - edit

I have a Doors object in a module which has an embedded (OLE) spreadsheet. I need to update some of the cell values (depending on the values of other objects in the module) using a DXL script. I have done some searching and I cannot find anything that looks like an example. I assume that the DXL script will need to open the object, make it's changes and then close the object.
Any help would be greatly appreciated

This thread is really old but if you still need help with this...Off the top of head, I think the way to go about this is to first make a copy of the OLE outside of DOORS, make your changes, and then put it back into DOORS.
To make a copy of the OLE outside of DOORS you can check out this thread:
https://www.ibm.com/developerworks/community/forums/html/topic?id=454298c1-c144-43e7-bc55-af8a6057b500
To put it back into the object text, you can do it similarly using oleInsert() which you can lookup in the DXL Reference Manual.

Related

Is there a way to extract Picture OLEObjects from a table?

This is a follow up to this question:
Is there a way to extract AutoCAD Drawings and Pictures from an OLE Object field
So the question remains, how would I go about retrieving the images stored in a Picture OLEObject? If anyone has succeeded in this and could shed some light I would really appreciate it. As I said in my previous post I've searched extensively for this and even tried several times on my own but I can't seem to get anywhere.
Thanks in advance, Rafael.
Edit to include Image. The message is what appears upon double-click. The OLE Object in question shows up if inserted into a Bound Object Frame in a Form.
Edit2: These Picture Objects can be recreated by taking a printscreen or a Snip (using the Snipping Tool on Windows) and pasting with CTRL+V on an OLE Object Field in a Table or a Bound Object Frame in a Form.

How to Open VB.NET Form in Design Mode

I have a VB.NET solution created in Visual Studio 2017. It seems like I used to double click Form1.vb in the Solution Explorer to open the form in design mode so I could add buttons and such.
Now no matter what I do, I can't open the design form window. It seems like there are fewer elements in the Solution Explorer, but I'm not sure:
Can someone tell me how to open the Form Designer again? Thanks.
The issue is exactly as I described in the first comment. Only the first type in a code file can be designed. If ServerForm is declared after ClientClass then ServerForm is not the first type in the code file, thus it cannot be designed. You could move ClientClass after ServerForm and that would address the issue but I would suggest doing what you should have done in the first place and declaring ClientClass in its own code file.
To that end, select the entire ClientClass definition and cut it to the Clipboard. Right-click your project in the Solution Explore and select Add > New Class and name it ClientClass, then select all the code in the new file and paste what you previously cut. You should then be able to build your project and now open your form in the designer.
I have two further suggestions. As I said, you appear to have renamed your form in the code. Don't do that. You now have the class name and file name out of sync. If you want to rename a type then you should also rename the file it is declared in. As you should almost always have just one type per file, they should be named the same. If you right-click the item in the Solution Explorer and select Rename, you can rename the file and you will then be prompted to similarly rename the type, which you should accept.
Finally, you should pretty much NEVER use "Class" as a suffix on the name of a class. You'll note that the String type is not named StringClass. You really ought to rename your ClientClass type Client. You might want to elaborate on what type of client, but the "Class" suffix is not a good idea.

Using querySaveDocument to additional information

We are trying to save some additional information with a document using the QuerySaveDocument event. However it seems that it is not being triggered at all.
<xp:executeScript script="#{javascript:setField(document1, 'cCustAddr1_fi', 'test');}">
</xp:executeScript>
This is our basic script. All the setField() method does is use replaceItemValue to try and set the field. However it seems that QuerySaveDocument is not even being triggered since we can write pretty much anything and the document will still save without problem, even if it would be impossible to execute.
We have also tried using a simple document1.getDocument().replaceItemValue() script, but again I dont think it even attempts to execute. Our documents save perfectly fine too,
Do you see any reason for this, are we doing our saving wrong, or should we be attaching data onto the document in another way?
Thanks.
Your other question on Unplugged (Using other dialog controls in iOS) suggests that you are using the Unplugged Mobile Controls project.
If that is correct then my comment above applies - the querySaveDocument event won't get fired . You can look at the code in UnpSaveDocument.xsp and possibly add your own SSJS code to that.
Alternatively, if you want an additional item created on your back-end Notes document then you should just be able to add a hidden field to the UnpFormEditor that is bound to the document1 data source and using the relevant item name you want.

VBA Macro changing macro

Is it possible to create a macro in MS Office (in this case Word) that will change other macro code? I was trying to find information but no results.
I have a doc which works as a template. Content of template is changed and then saved to another file. However it is important to have current date in it. It cannot be self-updated. Those docs go to folder of people and it is important to know when they get the document, so it must be simply data (or something that does not update).
I was thinking about an on-start event macro that would input current date and on exit it would ask "Do you want self-update functionality" Yes / No
If Yes, delete that event. However I have no idea if it is possible. If it is I still don't know how to search for it.
No this is not possible. In VBA, unlike some lower level languages when you define an event you can not disable it, even using other VBA code.
In C# or VB.NET, Java or C++ you can disable an event by un-wiring it from the handler, but this is not possible in VBA.
Maybe if you be more clear on what you need I can give you a better answer.

Create a shared copy and paste menu for my grids

I have 20 or so grids in my application suite. I'd like to create a global copy/paste context menu which I can bind to every single grid rather than code in each form.
I am unsure what is the best way to achieve this, I have started to create a class with my menu in it, but get stuck at the point of adding the actual menu options. For example I know I'll need to call a "copy" event, but I also know I'll need to tell it what I am copying, and I cannot see how that is done in vb.net when you can only add the address of a method minus parameters.
e.g.
.MenuItems.Add("Copy Cell", New System.EventHandler(AddressOf CopyCell))
Obviously I want "CopyCell" to only be coded in one place as well, rather than repeated in each form. I will always be copying the same object (SelectedCellCollection).
I am not sure how to make the menu have an event with parameters, or how to make it "know" that I want to always copy the selected items. I'm aware that I'd have to do some coding in the form but just trying to work out the way to minimize it.
I have created my own context menu class (via inheritance) with specific copy and paste functionality / options tailored to the grid I am using. It works fine and only needs one line of code per form/grid to activate.