Excel & ActiveX: Insert arbitrary columns from 2D array and create graph problems

Hi there,
I want to insert data from either a 1D or 2D array from LabView into Excel and create graphs.
I used the information from the following example:
http://www.ni.com/example/28934/en/
and was able to create a new Excel file (I'm using Excel 2010), writing data from an 1D array to a column in excel by creating a while loop and using the first element of the array to write it to a specific cell. I use the counter of the loop to write to the next cell when the loop starts over and always delete the first value, which I write to the cell, from the array until it is empty.
Now I also would like to write a 2D array - so the first column in Excel should be the first column from the array and so. Here I cannot use the loop counter directly as Excel only counts 1,2,... for the rows, but uses A,B,... to count columns. Also I do not know in advance how many columns my 2D array will contain, so creating a lookup table like (A means 1, B means 2,...) is not really an option (except there really is no other way). Is there a possibilty to convert numbers into letters or some way to 'explain' to the program that column 2 in the array means column B in Excel for example, or is there a way to insert new columns?
I figured out how to add new Worksheets and as I also need to create a certain number of Worksheets and I know that on standard 3 sheets are present when creating the file, I use the 'add' methode to create every new worksheets before worksheet 3 - I could use the same methode to create new columns in Excel, but so far I didn't find a methode to do so. Or is there a way to enter the whole 2D array at once?
Then I'd like to create a graph (in case of the 1D arrays a bar plot, when using 2D arrays a 3D plot) to view the data. I found this example:
http://www.ni.com/newsletter/51339/en/
-> as I do not have the toolkit I'd like to do it using ActiveX directly, so I tried to do things like shown under the headline 'DIY ActiveX/.NET'
I tried to load the snippet to a new Excel file but got the error message 'microsoft.office.interop.excel.dll not found' and hence the code is not working. That confuses me a little as I would guess when this dll is not present I cannot access Excel from LabView at all, though my understanding of what I'm really doing so far is quiet limited. ;-)
Also - as far as I understand from the snippet - when creating a new chart object I should be able the create methodes for it, however when I do a right click on the chart object of an ActiveX Worksheet symbol there are none listed.
To explain my problems better I added a snippet showing my two problems: The inner of the two while loops shows how I import a 1D array. In the outer loop I seperate the columns. I know that currently this is not working as all data end up in column A of the Excel sheet - so I would need to convert the number of the outer counter to A, B,... or find a different solution.
Moreover on the snippet I placed an ActiveX Worksheet Property with the Chart Object - as I can see the difference to the Chart Object in the example code from the last link above is the color. However I'm not sure what that means and how to change/ solve this.
And just to make sure - I know this way the VI does not run as the Chart Object is placed completely wrong - I just did it, so it is included in the snippet.
I'd be thankful for any suggestions,
Thanks!
Solved!
Go to Solution.
Attachments:
ExcelAreaScan.png ‏60 KB

Hello everyone and thanks for the answers.
I only have the LabView Student Edition available here - is the toolkit included in it too. How can I check if it is installed/ available and in case it is installed - where can I find it?
Today I had time to take a look at the example
Create via ActiveX Labview a XY Scatter plot graph on an excel sheet
It almost does what I want in terms of creating a graph. The only problem I could not fix, is that in this example a sheet is created where only the graph is present. i'd like to add the graph to a previously created worksheet. Today I tried get this working but it seems I stilll don't really understand what I'm doing, I'll post a snippet of my code as soon as I can access the PC with LabView on it again.
I also took a look at the other example for inserting 2D attays - it seems to be what I need, I just had no time so far to test it, I'll post an update when I could test it.
Thanks for the help so far!

Similar Messages

  • Insert direct column from database table and function value into a table

    Hi All,
    Please resolve this query for me....
    Suppose my select query is like this
    Select empno from EMP; (simple select)
    Select fun_dept(empno) from dual;(function)
    i want both the output of the select query to be written into a table like this....
    Suppose out of the First Select query is ..... 45009
    Output for the Second Query is...................ECE
    i want to insert this output into a table...like
    something like this
    XX:
    Empno Dept
    45009 ECE
    how to do this..??
    Thanks in Advance,
    Regards,
    Gita

    My exact query is like this.
    create or replace function fun_sal(v_rno number,v_year number,v_period number)
    return number as
    cursor s is
    select salary from emp where eno=v_rno and eyear=v_year and eperiod=v_period;
    begin
    open s;
    loop
    exit when s%notfound;
    fetch s into v_sal;
    if v_sal<1000 then
    sal:=v_sal*1555;
    else
    sal:=0;
    return sal;
    end if;
    end loop;
    close s;
    end;
    create or replace procedure pro_act(v_rno number,v_year number,v_period number) as
    v_eno number(10);
    v_ename varchar2(10);
    cursor c is
    select eno,ename from emp where eno=v_rno and eyear=v_year and eperiod=v_period;
    begin
    open c;
    loop
    exit when c%notfound;
    fetch c into v_eno,v_ename;
    insert into master(empno,empname,rev_salary)values(v_eno,v_ename,"*****function fun_sal value has to come here*******");
    commit;
    end loop;
    close c;
    end;
    how to do....

  • How to insert select columns from one internal table to another

    Hi,
    How to insert select columns from one internal table to another based on condition as we do from a standart table to internal table.
    regards,
    Sriram

    Hi,
    If your question is for copying data from 1 int table to other ;
    we can use
    APPEND LINES OF it_1 TO it_2.
    or if they have different columns then:
    loop at it_1 into wa_it1.
    move wa_it1-data to wa_it2-d1.
    apped wa_it2 to it_2.
    clear wa_it2.
    endloop.
    thnxz

  • Remove specific row and column from 2d array

    Hi,
    I would like to know how to remove the specific row and column from 2d array.
    for example, I have the original 4x4 array as below
    2 -1 -1 0
    -1 2 0 -1
    -1 -1 2 0
    -1 -1 -1 3
    let say that i want to remove row 2(bold) and column 2(bold), and the new 2d array should get as below
    2 -1 0
    -1 2 -1
    -1 -1 3
    Thanks.

    You can't remove elements of an array, it's fixed at a certain size once created. What you can do however is make a new array and only copy the things you want. Something like:public static void main(String[] args) {
        Integer[][] bar = new Integer[5][5];
        for (int i = 0; i < bar.length; i++) {
            Integer[] baz = bar;
    Arrays.fill(baz, i);
    System.out.println(Arrays.toString(baz));
    Integer[][] muu = new Integer[5][4];
    removeColumn(3, bar, muu);
    for (Integer[] mee : muu) {
    System.out.println(Arrays.toString(mee));
    Integer[][] smuu = new Integer[4][5];
    removeRow(3, bar, smuu);
    for (Integer[] mee : smuu) {
    System.out.println(Arrays.toString(mee));
    public static <T> void removeRow(int row, T[][] a, T[][] result) {
    if (row >= a.length) {
    throw new IllegalArgumentException("no row at " + row);
    for (int a_r = 0, result_r = 0; a_r < a.length; a_r++) {
    if (a_r == row) {
    continue;
    System.arraycopy(a[a_r], 0, result[result_r], 0, a[a_r].length);
    result_r++;
    public static <T> void removeColumn(int col, T[][] a, T[][] result) {
    for (int i = 0; i < a.length; i++) {
    if (col >= a[i].length) {
    throw new IllegalArgumentException("no column at [" + i + ", " + col + "]");
    for (int a_i = 0, r_i = 0; a_i < a[i].length; a_i++) {
    if (a_i == col) {
    continue;
    result[i][r_i] = a[i][a_i];
    r_i++;

  • I want to write a script or Automator workflow/app that emails a random shortcut of the day to three recipients. The source is from an Excel spreadsheet. One column is the shortcut, and the second column is the definition. Anyone have experience?

    I want to write a script or Automator workflow/app that automatically emails a random shortcut of the day to three recipients. The source is from an Excel spreadsheet. One column is the shortcut, and the second column is the definition. Anyone have similar experience and know that this would work?

    I have had a first stab at the script, below.  It uses a file to store the shortcuts and command [descriptions].  You should be able to see from the script annotations how to add a new one.  (I populated 1-4 with real data, but got lazy after that, so you have a few placeholders to work with first.
    As I have noted, once you are happy that you have all the data in the file, you can comment out part of the script for ongoing use.  (BTW, my reluctance to use Excel is that I don't currently have it installed and I don't want to offer wrong advice.  If you have Numbers, I do have that and could probably modify to work with a spreadsheet from there.  This might be especially useful if you have the data already sitting in Excel.)
    A few things came-up whilist I was writing the script:
    1.     Currently, all recipients will not only get the same tip at the same time, but they will see the names and email addresses of the others who receive them.  It is possible to modify this.
    2.     I have added a property gRandomCheck which keeps track of which shortcut has already been used (since the last time the script was compiled.  This will prevent the same tip being sent more than once.    When all tips have been sent once, the script will alert you and not send anything until reset.  It does not check on a per-addressee basis (which would be a refinement).  (If you add a new addressee at this stage, the whole process will start again, and you may not really want this to be the behaviour.)
    3.     The way that I have built the list, commandList, is deliberately cumbersome - it's for the sake of clarity.  If you prefer, you can construct the whole list as {{shortcut:"X", command:"X"}, {shortcut:"Y", command:"Y"}}
    Have a look - I am sure you will have questions!
    SCRIPT STARTS HERE  Paste the following lines (thru the end) into a new AppleScript Editor document and press RUN
    --The property gRandomCheck persists between runs and is used to stop sending the same hint twice.
    property gRandomCheck : {}
    --I am defining a file on the desktop.  It doesn't have to be in this location
    set theFolder to path to desktop
    set commandFile to (theFolder as text) & "CommandFile.csv"
    --(* Unless you need to change the file contents you do not need to write to it each time.  Remove the "--" on this line and before the asterisk about 18 lines below
    --Follow this format and enter as many records as you like on a new line - each with a unique name
    set record1 to {shortcut:"Z", command:"Undo"}
    set record2 to {shortcut:"R", command:"Record"}
    set record3 to {shortcut:"⇧R", command:"Record Toggle"}
    set record4 to {shortcut:"⌘.", command:"Discard Recording & Return to Last Play Position"}
    set record5 to {shortcut:"X", command:"x"}
    set record6 to {shortcut:"X", command:"x"}
    set record7 to {shortcut:"X", command:"x"}
    set record8 to {shortcut:"X", command:"x"}
    set record9 to {shortcut:"X", command:"x"}
    set record10 to {shortcut:"X", command:"x"}
    set record11 to {shortcut:"X", command:"x"}
    set record12 to {shortcut:"X", command:"x"}
    set record13 to {shortcut:"X", command:"x"}
    --Make sure you add the record name before randomCheck:
    set commandList to {record1, record2, record3, record4, record5, record6, record7, record8, record9, record10, record11, record12, record13}
    --This part writes the above records to the file each time.
    set fileRef to open for access commandFile with write permission
    set eof of fileRef to 0
    write commandList to fileRef starting at eof as list
    close access fileRef
    --remove "--" here to stop writing (see above)*)
    --This reads from the file
    set fileRef to open for access commandFile with write permission
    set commandList to read fileRef as list
    close access fileRef
    --Here's where the random record is chosen
    set selected to 0
    if (count of gRandomCheck) is not (count of commandList) then
              repeat
                        set selected to (random number from 1 to (count of commandList))
                        if selected is not in gRandomCheck then
                                  set gRandomCheck to gRandomCheck & selected
                                  exit repeat
                        end if
              end repeat
    else
              display dialog "You have sent all shortcuts to all recipients once.  Recompile to reset"
              return
    end if
    --This is setting-up the format of the mail contents
    set messageText to ("Shortcut: " & shortcut of record selected of commandList & return & "Command: " & command of record selected of commandList)
    tell application "Mail"
      --When you're ready to use, you probably will not want Mail popping to the front, so add "--" before activate
      activate
      --You can change the subject of the message here.  You can also set visible:true to visible:false when you are happy all is working OK
              set theMessage to (make new outgoing message with properties {visible:true, subject:"Today's Logic Pro Shortcut", content:messageText})
              tell theMessage
      --You can add new recipients here.  Just add a new line.  Modify the names and addresses here to real ones
                        make new to recipient with properties {name:"Fred Smith", address:"[email protected]"}
                        make new to recipient with properties {name:"John Smith", address:"[email protected]"}
      --When you are ready to start sending, remove the dashes before "send" below
      --send
              end tell
    end tell

  • Last One I Promise! Inserting A Value In An Array And Shifting TheRest Over

    Last question I have, I need to know the theory behind inserting a value into an array and shifting the rest over.. I have somewhat of an idea and that is this:
    Obviously I need to use a for loop, and a temp value to hold each value until it shifts then move on to the next value? Oh and increase the size of the array by one? I'm having trouble making sense of it..
    lets say we have the same array as from before
              int[] aRay = new int[5];
              aRay[0] = 1;
              aRay[1] = 9;
              aRay[2] = 3;
              aRay[3] = 4;
    aRay[4] = 11;
    and we want to add... lets say the element 5 into the index spot of 2 is and shift 2 to 3 and 3 to 4 and 4 to 5.
    for ( int i = 0; i < aRay.length; i++) // this will move along each element of the array (so I know I need this for sure)
    Am I on the right track? thanks all
    Edited by: Jojobaba on May 13, 2008 11:50 PM
    Edited by: Jojobaba on May 13, 2008 11:54 PM

    Jojobaba wrote:
    I can do all that, the only trouble I'm having right now is what's the correct way to increase the size of the array by one more? if I try to declare 4 as 5 it gives me a runtime error because 5 is out of bounds, and rightly so, because it doesn't exist
    Once I get that, the rest will be cake
    int[] aRay = new int[5];
    ^
    l
    l
    Do I just make this a 6? or is that not the right way.. :/You can't change array sizes dynamically. You will have to make a new array of the appropriate size and copy into it. You could use copyOf: http://java.sun.com/javase/6/docs/api/java/util/Arrays.html#copyOf(int[],%20int)
    I hope this is purely an academic exercise, because there's no reason to do this.

  • I want read PDF file from SAP directory and create a spool request or print

    Hi all,
    I want read PDF file from SAP directory and create a spool request or print the pdf through SAP. Can any body  help me in this.
    Also please write to me if its possible to open PDF from SAP directory to adobe pdf reader.
    Thanks in advance,
    Sunny

    Hi Sunny,
    Check these links.
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    http://www.erpgenie.com/sap/abap/pdf_creation.htm
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Hi, I need to take my daughter off from our Apple account and set up her own. So, delete her from one account and create her own. Realize I sound imbecilic for not knowing how to do this. Any ideas? Thank you so much. Jules

    Hi, I need to take my daughter off from our Apple account and set up her own. So, delete her from one account and create her own. Realize I sound imbecilic for not knowing how to do this. Any ideas? Thank you so much. Jules

    You don't have to take her off your account exactly: she needs to sign out from your account on her computers and devices. Then she can obtain an Apple ID at http://appleid.apple.com and use it to sign into System Preferences or Settings>iCloud.
    However, there are some issue about this. If she has been syncing her calendars and contacts to your account then the data will disappear from her devices, but remain on your account. Individual calendars can be exported  as .ics files and reimported into her account, but if she has her contacts mixed up with yours she will have to enter them individually in the new account (or export yours, import them into hers, and delete the ones she doesn't want.
    More intractable is the email issue. She cannot move an address from your account to hers, so if she has been using a alias on your account to have her own address she cannot transfer it. She will have to create a new email address.

  • How to separate perticular column from multidimensionl array

    dear all,
    i am just reading CAN bus message, problem is that it is accomodated in a 11X7 array which includes frame time stamp, ID, byte length etc but i am interested in CAN data. can anybody tell me how to separate that column from all. i want to read a column of 5 with all rows. how it is possible.

    Hello Sanjay,
    If your requirement is simply to obtain a single column from a 11x7 array, I would suggest you should do the following:
    1. Use Transpose 2D array to obtain a transposed array
    2. Use Index Array function to retrieve invidual row (which is actually the column of non-transposed array).
    Use index value of 4 (zero indexed), and the output would be a 1D array containing all elements of column 4 (zero indexed) of the original array.
    I hope this helps.
    Regards,
    Navjodh

  • How to get the columns from SYS.ALL_COLUMNS and use it in COALESCE() Function.

    Hi,
    I have table called Employe. And the Columns are Emp_ID,EMP_NAME,SRC_SYS_CD,DOB
    I have Query like
    Select
    COALESCE(MAX(CASE WHEN src_sys_cd='1' THEN Emp_id END), MAX(CASE WHEN src_sys_cd='2' THEN Emp_Id END))Emp_Id,
    COALESCE(MAX(CASE WHEN src_sys_cd='1' THEN Emp_name END), MAX(CASE WHEN src_sys_cd='2' THEN Emp_Name END))Emp_name,
    COALESCE(MAX(CASE WHEN src_sys_cd='1' THEN dob END), MAX(CASE WHEN src_sys_cd='2' THEN dob END))dob ,
    from Employe
    group by dob.
    I want to generalize the query like get the columns from SYS.ALL_COLUMNS table for that table name and want to pass it to COALEACE() function. I tried with Cursor. But i didnt get the appropriate results.
    Is there any way to achieve this? Please help me out in this regard.
    Thanks,

    Is this the kinda thing you're after?
    Add a filter to the queries to get just a single table/
    WITH allCols AS (
    SELECT s.name as sName, o.name AS oName, c.name AS cName, column_id,
    CASE WHEN st.name in ('float','bigint','tinyint','int','smallint','bit','datetime','money','date','datetime2','uniqueidentifier','sysname','geography','geometry') THEN st.name
    WHEN st.name in ('numeric','real') THEN st.name + '('+CAST(c.scale AS VARCHAR)+','+CAST(c.precision AS VARCHAR)+')'
    WHEN st.name in ('varbinary','varchar','binary','char','nchar','nvarchar') THEN st.name + '(' + CAST(ABS(c.max_length) AS VARCHAR) + ')'
    ELSE st.name + ' unknown '
    END + ' '+
    CASE WHEN c.is_identity = 1 THEN 'IDENTITY ' ELSE '' END +
    CASE WHEN c.is_nullable = 0 THEN 'NOT ' ELSE '' END + 'NULL' AS bText,
    f.name AS fileGroupName
    FROM sys.columns c
    INNER JOIN sys.objects o
    ON c.object_id = o.object_id
    AND o.type = 'U'
    INNER JOIN sys.systypes st
    ON c.user_type_id = st.xusertype
    INNER JOIN sys.schemas s
    ON o.schema_id = s.schema_id
    INNER JOIN sys.indexes i
    ON o.object_id = i.object_id
    AND i.index_id = (SELECT MIN(index_id) FROM sys.indexes WHERE object_ID = o.object_id)
    INNER JOIN sys.filegroups f
    ON i.data_space_id = f.data_space_id
    ), rCTE AS (
    SELECT sName, oName, cName, column_id, CAST(cName + ' ' + bText AS VARCHAR(MAX)) as bText, CAST(cName AS VARCHAR(MAX)) AS colList, fileGroupName
    FROM allCols
    WHERE column_id = 1
    UNION ALL
    SELECT r.sName, r.oName, r.cName, c.column_id, CAST(r.bText +', ' + c.cName + ' ' +c.bText AS VARCHAR(MAX)), CAST(r.colList+ ', ' +c.cName AS VARCHAR(MAX)), c.fileGroupName
    FROM allCols c
    INNER JOIN rCTE r
    ON c.oName = r.oName
    AND c.column_id - 1 = r.column_id
    ), allIndx AS (
    SELECT 'CREATE '+CASE WHEN is_unique = 1 THEN ' UNIQUE ' ELSE '' END+i.type_desc+' INDEX ['+i.name+'] ON ['+CAST(s.name COLLATE DATABASE_DEFAULT AS NVARCHAR )+'].['+o.name+'] (' as prefix,
    CASE WHEN is_included_column = 0 THEN '['+c.name+'] '+CASE WHEN ic.is_descending_key = 1 THEN 'DESC' ELSE 'ASC' END END As cols,
    CASE WHEN is_included_column = 1 THEN '['+c.name+']'END As incCols,
    ') WITH ('+
    CASE WHEN is_padded = 0 THEN 'PAD_INDEX = OFF,' ELSE 'PAD_INDEX = ON,' END+
    CASE WHEN ignore_dup_key = 0 THEN 'IGNORE_DUP_KEY = OFF,' ELSE 'IGNORE_DUP_KEY = ON,' END+
    CASE WHEN allow_row_locks = 0 THEN 'ALLOW_ROW_LOCKS = OFF,' ELSE 'ALLOW_ROW_LOCKS = ON,' END+
    CASE WHEN allow_page_locks = 0 THEN 'ALLOW_PAGE_LOCKS = OFF' ELSE 'ALLOW_PAGE_LOCKS = ON' END+
    ')' as suffix, index_column_id, key_ordinal, f.name as fileGroupName
    FROM sys.indexes i
    LEFT OUTER JOIN sys.index_columns ic
    ON i.object_id = ic.object_id
    AND i.index_id = ic.index_id
    LEFT OUTER JOIN sys.columns c
    ON ic.object_id = c.object_id
    AND ic.column_id = c.column_id
    INNER JOIN sys.objects o
    ON i.object_id = o.object_id
    AND o.type = 'U'
    AND i.type <> 0
    INNER JOIN sys.schemas s
    ON o.schema_id = s.schema_id
    INNER JOIN sys.filegroups f
    ON i.data_space_id = f.data_space_id
    ), idxrCTE AS (
    SELECT r.prefix, CAST(r.cols AS NVARCHAR(MAX)) AS cols, CAST(r.incCols AS NVARCHAR(MAX)) AS incCols, r.suffix, r.index_column_id, r.key_ordinal, fileGroupName
    FROM allIndx r
    WHERE index_column_id = 1
    UNION ALL
    SELECT o.prefix, COALESCE(r.cols,'') + COALESCE(', '+o.cols,''), COALESCE(r.incCols+', ','') + o.incCols, o.suffix, o.index_column_id, o.key_ordinal, o.fileGroupName
    FROM allIndx o
    INNER JOIN idxrCTE r
    ON o.prefix = r.prefix
    AND o.index_column_id - 1 = r.index_column_id
    SELECT 'CREATE TABLE ['+sName+'].[' + oName + '] ('+bText+') ON [' + fileGroupName +']'
    FROM rCTE r
    WHERE column_id = (SELECT MAX(column_id) FROM rCTE WHERE r.oName = oName)
    UNION ALL
    SELECT prefix + cols + CASE WHEN incCols IS NOT NULL THEN ') INCLUDE ('+incCols ELSE '' END + suffix+' ON [' + fileGroupName +']'
    FROM idxrCTE x
    WHERE index_column_id = (SELECT MAX(index_column_id) FROM idxrCTE WHERE x.prefix = prefix)

  • HOW TO RETRIEVE A LONG RAW COLUMN FROM A TABLE AND WRITE TO OS FILE

    Good evening.
    Please how can I read a long raw datatype from a table and insert into an operating system file using PL/SQL.
    Thank you.

    What does this have to do with LONG RAW? It is about UTL_FILE and not especially great code.
    The question is how to retrieve and write LONG RAW and that is quite a different matter.
    First you must convert it to BLOB.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654
    Then you can write it out to the file system
    http://www.morganslibrary.org/reference/utl_file.html
    Look at the "Extract Blob" demo

  • Booting from thunderbolt array and accessing projects

    I'm attempting to speed up my FCPX flow on my iMac.  The biggest problem is the slow harddrive installed in the iMac and because its difficult to replace, the easiest solution is to duplicate my Macintosh HD drive to an external thunderbolt RAID-0 array and boot to it.  That way everything runs snappy.
    The problem I'm finding (aside from a few apps complaining about the 'hardware' change thinking they are on a different computer), FCPX no longer sees all my projects.  How do I get my projects back?
    Original install:
    FCPX located on 'Macintosh HD'
    Projects and media located on 'ScaryRaid' external thunderbolt RAID0 array.
    New install:
    FCPX located on 'ScaryRaid' external thunderbolt RAID0 array along with projects and media.
    -> so the only thing that 'moved' was the operating system and apps.

    I was hoping the solution was as simple as this.  Thank you!
    However, if I want to be able to access my events in both ways, creating an alias in my Movies folder to the 'Final Cut *' folders in the main directory on the drive doesn't work.  Creating soft links using ln -s doesn't appear to work either.  Is there a way to create links that FCPX will recognize?
    Thanks!

  • Need help Take out the null values from the ResultSet and Create a XML file

    hi,
    I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
    a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
    takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
    from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
    null values to XML File. When i run the program it works alright and adds the null and not null values to
    the file. But when i pass the boolean value to take out the null values it would not take it out and adds
    the null and not null values.
    Please look at the code i am posing. I am showing step by step where its not adding the null values.
    Any help is always appreciated.
    Thanks in advance.
    ============================================================================
    Frame1 Class
    ============
    public class Frame1 extends JFrame{
    private JPanel contentPane;
    private XQuery xQuery1 = new XQuery();
    private XYLayout xYLayout1 = new XYLayout();
    public Document doc;
    private JButton jButton2 = new JButton();
    private Connection con;
    private Statement stmt;
    private ResultSetToXML rstx;
    //Construct the frame
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    xQuery1.setSql("");
    xQuery1.setUrl("jdbc:odbc:SCANODBC");
    xQuery1.setUserName("SYSDBA");
    xQuery1.setPassword("masterkey");
    xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
    contentPane.setLayout(xYLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
    jButton2.setText("Get XML from DB");
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(java.lang.ClassNotFoundException ex) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(ex.getMessage());
    try {
    con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
    stmt = con.createStatement();
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton2_actionPerformed(e);
    contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton2_actionPerformed(ActionEvent e) {
    try{
    OutputStream out;
    XMLOutputter outputter;
    Element root;
    org.jdom.Document doc;
    root = new Element("PINFO");
    String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
    ResultSet rs = stmt.executeQuery(query);
    /*===========This is where i am passing the ResultSet and boolean=======
    ===========value to either add the null or not null values in the file======*/
    rstx = new ResultSetToXML(rs,true);
    } //end of try
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    ======================================================================================
    ResultSetToXML class
    ====================
    public class ResultSetToXML {
    private OutputStream out;
    private Element root;
    private XMLOutputter outputter;
    private Document doc;
    // Constructor
    public ResultSetToXML(ResultSet rs, boolean checkifnull){
    try{
    String tagname="";
    String tagvalue="";
    root = new Element("pinfo");
    while (rs.next()){
    Element users = new Element("Record");
    for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
    tagname= rs.getMetaData().getColumnName(i);
    tagvalue=rs.getString(i);
    System.out.println(tagname);
    System.out.println(tagvalue);
    /*============if the boolean value is false it adds the null and not
    null value to the file =====================*/
    /*============else it checks if the value is null or the length is
    less than 0 and does the else clause in the if(checkifnull)===*/
    if(checkifnull){ 
    if((tagvalue == null) || tagvalue.length() < 0 ){
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    root.addContent(users);
    out=new FileOutputStream("c:/XMLFile.xml");
    doc = new Document(root);
    outputter = new XMLOutputter();
    outputter.output(doc,out);
    catch(IOException ioe){
    System.out.println(ioe);
    catch(SQLException sqle){

    Can someone please help me with this problem
    Thanks.

  • Trying to install SL on a new hard-drive for my iMac, when asked which disk to install on it gave me no options, i followed advice from another forum and created a partition, now can't boot from the new drive at all. Help?

    I've had **** with my iMac, the hard-drive failed so i replaced it with a new 1TB Samsung drive. Then when i tried to install SL from the install disk, all went to plan until it asked me which drive i wanted to install it on, where it came up with a box where my options should have been, but instead it didn't give me any options to install it on any drive i.e. it asked which drive i wanted to install it on but no drives came up to select.
    So i followed the advice from another forum, look at the 'Extended Hard-drive preparation' response
    ( https://discussions.apple.com/message/10576009#10576009 )
    After following these instructions i have now got a new partition, but when i restarted my computer to install SL on the drive, the option to boot from the drive is now not available, now i must boot from the install disk, whereas before i was able to boot from either the install disk or the hard drive. The hard drive is still visible in disk utility as it always has been, but i am now unable to boot from it, let alone install SL.
    Please help my iMac has been broken for months and i've been trying to fix it for so long and am getting problem after problem. Thank you!
    <div class="mcePaste" id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" mcestyle="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"></div>

    Hi db2
    That off the shelf MS-DOS / FAT-32 drive needs to re-partitioned GUID Partition Table / Mac OS Extended (Journaled) before you can install OS X and Startup your Intel iMac from it.
    1. Boot from your original install or retail SL DVD and open Disk Utility.
    2. Highlight the new HD in the list of drives and select the Partition tab.
    3. Under Volume Scheme select 1 Partition and click on the Options... button.
    4. Select GUID Partition Table in the drop down window and click OK.
    5. Set the Format to Mac OS Extended (Journaled) and click the Apply button.
    6. Once thats done, then you can do a clean SL Install, Restore from TM , your old HD or  Bootable Clone.
    Dennis

  • How to hide or remove several areas from a clip and create a generator

    Hello dear comnunity,
    I'm in an urgent need an assistance:
    I need to proeuce a video of a screen recoding.
    I'm using Camtasia in order to record. The meterial is pretty static.
    The problem:
    I have a lot of information on the screen while I'm recoding which I'd like to remove in post.
    Basically what you see is a poker table. Each circle represents a player.
    What I need is to be able to "remove" all these colorful numbers in order to provide with a "cleaner" look.
    I understand that this can be accomplished by "layers" i.e.
    Use this as a "background":
    and then remove all of the areas with the colorful numbers.
    In short:
    I'd like to remove multiple areas from a single clip without having "holes".
    Note:
    Since I producing multiple vidoes I would like to be able to have some sort of effect\preset\generator etc in order to automate the process every time.
    I have FCP X as well as Motion 5.
    I saw some split screen generators with multiple areas. It looks like what I need but I do need to make my own custom splits.
    PLEASE try to provide with detailed information as much as possible. I'm not a noobie but not an expect as well.
    Thanks in advance, I really really appreciate your assistance.

    By default, the toolbar cannot be hidden.
    However, you can add button items to the toolbar, hook up to the event handlers, and create new menus and menu-items in your gadgets.
    What version of Smart Space are you using? The SDK is slightly different between 9.3.1 and 11.1.x
    There are ways to work around the toolbar and do some other slick UI renderings in regards to these topics.
    Please drop me an email and we can have a phone conversation around what you are trying to do. I may be able to provide some ideas for you.
    Thanks,
    Rob Hull
    Oracle Smart Space
    Development Manager
    [email protected]

Maybe you are looking for