Drag and drop to create a custom step

Hello

I have an insert in my custom user interface palette. I want to allow the user to drag the step of the palette of insertion in the original designer of the sequence, as the Insert palette. The insert custom palette is in WPF.

The data format for the object slide - déposer is

e.Data.GetFormats)
{string [1]}
[0]: "SeqEditor new Step binary.

The data is actually a MemoryStream:

e.Data.GetData (e.Data.GetFormats () [0])
{System.IO.MemoryStream}
Base {System.IO.Stream}: {System.IO.MemoryStream}
CanRead: true
CanSeek: true
CanWrite: true
Capacity: 6936
Length: 6936
Position: 0

So, it's actually a Unicode text if I read it with StreamReader:

new StreamReader ((Stream) e.Data.GetData (e.Data.GetFormats () [0]), Encoding.Unicode). ReadToEnd()
' E@=3@JKZ100h\\L] JDYcLO7e9@FLU:h9iM] > 5Uf16W > Hii091DHkYGJKJHMd [].<>

What is the right way for me to implement operation drag and drop my palette to insert custom options? I think to create a MemoryStream similar but I do not understand the format of the data.

Thank you.

Please note that the Clipboard format is not something that we intend to create directly and they may change in a future version of TestStand. So if you do this, keep in mind that it is possible, it may not work in a future version of TestStand (i.e. we do not support creating Clipboard elements directly).

That said, it would be possible to operate in the current versions of TestStand as follows (I did not do exactly what you do, but here's how our format is currently produced):

PropertyObject [] stepPropObjects = new PropertyObject [1];
Step newStep = templateOfStep.AsPropertyObject (). Clone ("", PropertyOptions.PropOption_CopyAllFlags |) PropertyOptions.PropOption_DoNotShareProperties) as a step;
newStep.CreateNewUniqueStepId ();
stepPropObjects [0] = newStep as PropertyObject;

DataObject dataObject = new DataObject();
StepFormat = DataFormats.GetFormat DataFormats.Format ("SeqEditor new binary stage");
String serializedPropertyObject = this. Engine.SerializeObjects (stepPropObjects, SerializationOptions.SerializationOption_UseBinary);
serializedPropertyObject += 'F'; False to isEditCut (so unique ID will be created on the dough).
System.Text.UnicodeEncoding encodingForStrConv = new System.Text.UnicodeEncoding ();
ubyte [] buffer = encodingForStrConv.GetBytes (serializedPropertyObject);
VvClipData of MemoryStream = new MemoryStream (buffer);
dataObject.SetData (stepFormat.Name, vvClipData, false);

Hope this helps,

-Doug

Tags: NI Software

Similar Questions

  • Cannot resize firefox so I can drag and drop to create a shortcut

    I can't make my Firefox page smaller so I can drag and drop a web site to create a shortcut. I use windows 7. I have no flu when I point at the bottom right. When I use zoom the page itself re sizes but not the window. I just need to see a bit of my office, so I can create a shortcut.

    Hi limomitch, Firefox will remember the last 'normal' window size by saving in this file you deleted (which Firefox creates new). To switch between the normal and maximized window styles, you usually just double-click the title bar of the window, or you can use the middle (the one between minimize and close) button in the upper right corner.

    If you find that the 'normal' window size has increased too, and if the lower right corner is not visible, you can try Alt + SPACEBAR. It is a convention of Windows on the scale to display the window control menu. If the size is not gray, press arrow down once, then the up arrow key repeatedly until the lower edge of the window is in view. Repeat with the left if necessary and right keys. (If the size is dimmed, choose restore and that might be all you need).

  • Drag and drop the confrontation with OCD on iPad

    I have a drag and drop exercise created in Captivate 7.0.1.237 the wizard drag / move.

    When I publish the project and display it on an iPad superimposed TOC pops out when I drag the movable elements on the screen with my finger.

    Does anyone know if there is a way to avoid this?

    Thanks in advance.

    In the slide Action Properties Panel, set the command to enter to run JavaScript.  Click the Script_Window button to open an input box.

  • Automatically open the change step where drag and drop a steptype

    Hello

    I would like to open (launch) Assembly step (labview module) when I drag and drop the step type. TestStand can step edt by the 'Edit' button or shortcut (Ctrl + E).

    Is it possible to do?

    I know that shortcuts are hardcoded...

    Thank you for your help

    Yannick

    Yes, it can be done. See this question recently on the same subject.

  • Why creates shortcuts for Moving files when drag and drop the folder or file in another folder?

    I am using Windows XP SP3, just before I drag and drop the file into another folder in my windows explore. Suddenly, he is creating shortcuts for moving file. I'm not able to move the file by drag / move the mouse, it is possible that by cutting and Paste(Ctrl+X) using the keyboard. Why?

    Maybe your 'Alt' key is stuck.
    See exchanging the keyboard with another makes all the difference.

    HTH,
    JW

  • When I drag and drop a file, it creates a shortcut does not copy the file. I want to copy the file instead create shortcut.

    • Drag
    • drop
    • Drag / move
    • copy
    • short cut
    • create

    If you want to make a COPY of the file you drag (leaving the original where it is and make a copy in the place that you drop the file), and then hold down the control (Ctrl) key on your keyboard while you drag and drop, and she must make a copy in the new location.

    Hold down the ALT key should make a link/shortcut to the original.  Now does no key should MOVE the file from the original location to the new location.

  • Creates shortcuts to folders via SHIFT-CTRL/Drag-And-Drop is no longer supported in Windows 7 (64 bit)?

    In Windows Vista, there are two possibilities to create a shortcut to a folder by drag - move different combinations of keys by drag-and - drop:

    'ALT'-key: create a normal shortcut (a double-click on this shortcut navigates to the linked folder)
    "SHIFT-CTRL"-key: creates a shortcut file (junction; "." the folder appears as a subfolder of the folder of its container)

    In Windows 7, it is only possible to create normal shortcuts. 'SHIFT-CTRL' / drag-and-drop doesn't seem to work in Windows 7. Only, it behaves in the same way as 'ALT' / drag-and-drop.

    My observation is correct?
    Is it possible to activate Vista-like behavior in Windows 7 (for example, by editing the registry)?

    A few notes:

    Shortcuts to files that have been created previously with Windows Vista are always managed properly in Windows 7 (i.e., they appear as subfolders).

    The expected behavior of drag-and-drop works correctly when deleting in the folder "...\AppData\Roaming\Microsoft\Windows\Network shortcuts" (However, creating normal shortcuts via "ALT" - key is not possible in the shortcut 'network' - folder).

    Creating a shortcut to folder in "Network shortcut" and then moving in an arbitrary folder shortcut works as expected. Currently, it is the only workaround I know.

    Thank you very much for your answer!
    -Rick-

    Hi Rick,

    Welcome to the Microsoft Answers site!

    Unfortunately this feature is gone in Windows 7. This is the design.

    Amrita M

    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How can I allow a learner to examine one created Drag and Drop Quiz to show to the learner their incorrect answers or correct?

    Captivate 8: I created an assessment with two multiple choice question slides and 8 drag and drop question slides. After that the learner views their score, I wish they were able to examine all their answers to see where the mistakes were made. Currently, the revision quiz shows that their answers and the correct answers to multiple choice question slides. Ideally I'd like a review of question slides slide - déposer where the incorrect choices appear in red or something to that effect. I appreciate any insight and suggestions!

    Sorry, D & D are not a normal question slide and I can't recommend a feature request registration. I would really be able to choose if an interaction is reset or not, because this problem is not just for D & D but for all interactions of training as well.

  • Drag and drop Page Acrobat thumbnails (creating a PDF of hGlobal storage medium)

    Hello

    I created an external windows on Acrobat who gets gout of the thumbnail of the page from the path of the page.

    Looking in the Format with the help of Windows OLE drag and drop, I could see the type of data sent via Acrobat

    Am able to get the name of the file of the FileGroupDescriptorW and I think that the actual data must reside in FileContents.

    My question is how to create a new PDF of the Filecontent.

    Yesterday is part of my code

    /**************************************

       * if we have a filename
       * *********************************/
       if(filename != ""){
       //window->simpleMessage("Filename: " + filename);
       // construct a FORMATETC object for Acrobat pages
       fmtetc.cfFormat = RegisterClipboardFormat(CFSTR_FILECONTENTS);
       fmtetc.ptd = NULL;
       fmtetc.dwAspect = DVASPECT_CONTENT;
       fmtetc.lindex = -1;
       fmtetc.tymed = TYMED_HGLOBAL ;
       //get the file content
       if (pDataObject->GetData(&fmtetc, &stgmed)){
       //debug Info
       window->simpleMessage("Filename: " + filename);
       // we asked for the data as a HGLOBAL, so access it appropriately
       PVOID data = GlobalLock(stgmed.hGlobal);
       /***
       * Create new PDF
       ***********************/
       GlobalUnlock(stgmed.hGlobal);
       // release the data using the COM API
       ReleaseStgMedium(&stgmed);
       }

    Well studied, but it is an undocumented interface, intended to drag it from Windows Explorer. If you can emulate a Windows Explorer drop target correctly, this can work for you, but Adobe will not help, I'm some [even if I don't speak for them].   I think we can assume that, because Windows is not a processor PDF, Acrobat extract pages and generates a full PDF file when you receive reminders right from Windows Explorer. If it's just file content, maybe its as simple as writing the data to a file.

    Please let us know what you like, you're not the first to want to do this, but you may have gotten the furthest!

  • Adobe Presenter 10 Drag and Drop questions - grey area only when you try to create

    Hello

    I try to create drag and drop questions in presenter 10 and after clicking on Add Question-> drag-and - drop, the new window opens but where I should be able to define the questions etc., the screen is just gray. Have the same problem on the three other systems as well.

    Flash is updated to the latest version as well as presenter 10.

    Oddly the Flash version installed is 15, but a right click in the grey box shows me version 11.

    Any ideas?

    Thank you

    Chris

    Just in case someone else has the same problem, a cat with Adobe brought the solution:

    On the gray screen, right click and go to global settings

    Go to the Advanced tab

    Scroll down and click on "trusted location settings.

    In the window 'Trusted location settings', click on 'Add' at the bottom

    Click on "Add a folder" and select "Local disk c".

    Click "Ok" and confirm on the "Trusted location settings" window

    Worked for me (on three different machines) like a charm!

  • How to create the Table using the column Drag and Drop feature

    Hello:
    I'm new to Data Modeler tool Oracle SQL dev and would like to know if there is a way to create a new table by reusing existing columns or groups of columns. The idea is to maintain consistency and save time of table design. If the columns created previously can be reused and require, drag and drop column in the right pane, then only new columns must be created manually.

    Any thoughts on this will be appreciated.

    Thank you!

    Yes - just change the name of the model table in the script (t_name = "table_template") then save this new transformation for later use.

    I don't know how to apply only some of the tables. Seems like something you could do to a secondary view level?

    Perhaps someone else on the forum can advise how to change the script to work on a subview only instead of the whole model.

  • Custom review info on drag and drop slides

    Hi all

    I want to do a personal study on a drag-and-drop slide.

    However, it seems not that I can get cpInReviewMode to trigger the visibility on my subject to review.

    Added the action advanced on enter. With the help of C9, latest patch.

    Try advanced action:

    IF (cpInReviewMode == 1)

    See the dd1

    Break

    ON THE OTHER

    Continue

    Also tried

    IF (cpInReviewMode == true)

    See the dd1

    Break

    ON THE OTHER

    Continue

    / Dan

    This slide drag & drop is set up as a question slide? The variable cpInReviewMode system is generally set to 1 for the quiz, when the user clicks on the review of the score slide.

    I suspect, didn't check that the Pause command is causing issues. This means that the read head stop on enter, maybe no time to show the hidden comments. I guess dd1's "feedback" that has been configured to be invisible in the output? You can try taking the Pause command? You can increase the duration of the slide or add a button with a break at the end of the slide. Of course, if you do not want to have a double Quiz time pauzé, this pause should be at the same time as the normal Submit button of D & D (1.5secs is the default value), and the next button can be made visible during the review with your conditional action.

  • Why don't I do drag and drop files in folders?

    Good so since I've reinstalled my computer I got in trouble on him drag / drop files into any kinds of files. I am able to copy and paste, delete and drag the files that were on my desk and move them, but I can't move all files in a folder. So I'm able to move anything in folders and desktop, but not able to move them to another location, unless if I copy and paste. I scanned for malicious things, did all the tests of virus and other things and still nothing. I searched on how to solve this problem, but nobody seems to have a problem like mine. Maybe a few, but none of the answers that were given on other forums for other people has not worked for me. If anyone can help me? And yes I checked if the box for customizing the taskbar if the drag and drop was allowed and he had checked them already. Please can someone help me?

    Hi Gmgregster16,

    1. what exactly happens when you drag - move? You get the error message?
    2. you have to any other user account? The problem persists in the other user account?

    Step 1: We recommend you to check if the problem persists in safe mode.
    a. see start the computer in safe mode
    b. check if the problem persists.

    Step 2: If the problem persists in safe mode, and then register a new user account
    see How to create and configure the user accounts in Windows XP .
    b. connecting to a new user account and check if the problem persists.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Enhancement request: improvement of Drag and Drop dashboards

    Hello

    I opened a ticket for this but I was told all requests for improvements have been conveyed by here now.  My end-users like foglight drag and drop dashboards and have created many custom edge tables specific to their groups or roles of the work.  I had a lot of requests for improvements to this feature a lot of them are cosmetic.

    Ability to control the fill color or the line color of data points.

    So that creating more of a host of table a still blue will overall of all charts.  Currently the colors match only if data points are added in the order of a chart to a chart

    Possibility to choose the maximum number on the axis Y

    Ability to set intervals on the axis Y (example: number 5, 10, 25, etc...)

    Possibility to set the threshold for a specific schema. (example: a red line to 80%)

    Ability points of label data manually with a label not in foglight (example: instead of the host name able to type in an application name)

    mivy00,

    Best thing to do is to enter the ideas section of the community where they can be read by all and voted.  I copy and paste is there for you, but it's better when it's a customer initiated entry.

    http://communities.quest.com/community/Foglight?view=idea

    Thank you

    Ken Barrette

  • Drag and drop, 1 share of different sur-succes drag Source, 4 Drop target, for each. Is this possible?

    Hello.

    I created an infographic of type board game and wants that the participant to be able to enter the game room, then drop it into different spaces on the Board, each holding to another slide. I need interaction drag - déposer so that they can pick up and drop the piece. Now, what I need is for each target to have a different action, but even if I add each one to a different group, if I change an action for one, that it applies the change to all drop targets.

    Is there a way to get around this?

    In addition, once / if possible, I would like to add a "back button" on each of these slides and would need when the participant returns to the boardgame slide, they can move the piece to a different drop target to read the following description. I think that the best way to do this would be to make all the "wrong" answers, while the game piece is not stuck once they have fell on a drop target "correct." Please correct me if I'm wrong.

    If I understand you correctly, I think that I thought about it.

    1. Create your Drag and Drop, as you would normally
    2. In the Panel of Drag and Drop, select the Options tab
    3. Click on the button set the correct answers
    4. The value of each drop target to have the source of displacement of the source (you must choose the sequence in the Type drop-down list)
    5. Create the slides that you want to display for each drop target
    6. Select one of the drop targets
    7. Go to the Format of the Panel Drag and Drop tab
    8. The Actions of the object... a button click
    9. In the action column, select go to slide, and then select the appropriate slide
    10. Repeat steps 6 through 9 for each target deposit
    11. Overview of the project

    I did a quick test and it seemed to work according to the settings you said earlier.

Maybe you are looking for

  • Satellite Pro started to stop abruptly without warning

    Hello Can someone advise me, I have a Toshiba Satellite laptop, it is around the age of 13 months, and he began to stop abruptly without warning.It seems to be when I run high processor applications. I have 3 questions, (1) it is first of all, this l

  • problems with re - install software roxio creator 9

    I had roxio creator 9 downloaded correctly, then a few weeks ago I started receiving messages that the certificate file is missing or damaged. not knowing exactly what it was just totally uninstalled the whole program i. now, I'm trying to re - insta

  • cannot connect to laptop - boots to the desktop, then log out automatically

    Original title: laptop, connect to the computer My laptop will go to the sign in screen, but when I connect it shows my desktop but then said disconnection and goes back to the login screen.

  • Can I add additional USB ports?

    We just bought a pack of PC HP Pavilion p7 1036b.  There is simply not enough USB ports.  Can we add additional ports?

  • Can I use windows 7 download UPGRADE to boot from USB?

    Hello. If I buy and can download the windows 7 UPGRADE on my USB key, can I then use it to start, after I format my computer? What are the steps? I know I must make a few changes (NTFS) to the USB port and verify that the PC starts in the footsteps o