Fillable object from line segments

I've created a tree object from line segments and it looks how I want it to look. I made it a compound path. When I fill it, I get weird results. I used live fill and that works fine, but I still dont get the pointed edges that I would like to see on the outline and I feel like there is a more elegant way to go about this. I have attached the image of the tree. The blue circle is the weird fill. The red circle is the pointed edges that I want. I got this point using the pen tool, but it doesn't act correctly with the rest of the path.
I am probably doing this all completely wrong,  but I'm a bit impatient for classes and I learn best through trial and  error.

Select your object and in your stroke panel increase the miter limit to a higher number
The weird gren or blue fill is probably because your points are not joined. Use the hollow arrow tool to select a point and move it you will see. You can fix by using the hollow arrow tool to select only the 2 points, then using object >> path >> join

Similar Messages

  • Using Command Line to move objects from one environment to another enviroment

    Can the Command Line (sacmd) be used to move Job Groups/Jobs and other object from one environment to another environment? If so, how?

    Moving jobs and objects can only be accomplished by using the Transporter application. There is a document called "Transporter User Guide" with a chapter called "Running Transporter in Batch Mode" that details how to send commands to transporter from the command line. It also details how to setup jobs in Tidal to use this command line. Once you have jobs in Tidal using the Transporter command line, you can then use sacmd to run these jobs.
    Does this make sense?

  • How to join multiple line segments to make a fillable polygon

    Howdy,
    I have illustrator CS2 12.0.1. Is there any easy way to create an irregular shaped fillable polygon? The way I currently do this is (1) I use the line segment tool to draw the sides of the polygon, (2) then for each corner of the polygon, I use the direction selection tool to select the corner, then do command-J to "join" the two segments that touch that corner. Only after doing that, I am finally able to use the eyedropper tool to fill the polygon.
    This take a lot of tedious effort. I have LOTS of polygons to draw. Once I have drawn the segments, it seems like I should just be able to select all the segments and have an option that does all the joins at once.
    Or, maybe instead of the line segment tool I could use some path tool. But whenever I have tried that, I end up with curved segments instead of straight ones.
    Can anyone tell me how to do this?
    Thanks for any help,
    Frank B

    Basically I am drawing on top of a bitmapped background which is a satellite map. My polygons are essentially the property lots on this map. So I visually see where the corners are, and I want to make a polygon that I can fill. I actually will fill with a few different translucent colors to indicate different types of lots. This all works fine except that my current means of drawing the polygons is tedious, and it seems like there should be a better way.
    Another way I could solve my problem is if I were able to reshape an existing polygon by dragging its corners to where I wanted them to be. I have not figured out how to do that. Either the entire polygon moves when I drag a corner, or the polygon gets reshaped by the drag in a way I don't want (what I want is to move one corner, and what I get instead seems like one corner stays put and the other three move around to keep constant skewishness; or something).
    Frank

  • How to fill an object made with line segment?

    I made some objects with the line segment tool, but i cant seem to fill them. Not even when i group the lines and try to fill after.
    Anybody an idea? thanks

    Live paint will do the trick you select the lines and click on the live paint bucket tool which will make the lines a part of live paint group, there are options for controlling the gap distance.
    Then select a color and click the live paint tool somewhere in the area that the lines are used to define. it will fill with that color.n CS 2 and 3 I think well CS3 for sure.

  • Obtain offset of a point from a line segment

    Hi,
    Given a line segment and a point perpendicular to the line segment(both in LRS). Is it possible to retrieve the offset of the point from the line segment. i've serached the LRS documentation and have not found a built in function to do so.

    If I understand you correctly, the following thread should answer that: If not, please explain further.
    lrs offset
    Bryan

  • Joining Line Segments

    The line looks like it's connected, but it's not. When I apply the brush effect it becomes disjointed. I want it to be one smooth stroke. Is there any way to join the line segments without having to redraw the stroke? I ask this because the line was imported into Illustrator from Flash, there are many more and I don't want to have to redraw them all. Thanks in advance for any help.

    Bob,
    Hopefully, you can:
    1. Deselect the path and then drag across each set of Anchor Points where the brushes go thin;
    2. Object>Path>Join.
    If you select the lot before 1+2, and look in the Layers palette, or open Window>Document Info, and select Objects in the flyout menu, you should be able to see that there are multiple paths; the latter shows the number of points in each selected object.
    If 1 + 2 do (or should it be does) not work, there are probably multiple Anchor Points at the end(s) of either/both of the paths to be joined; the surplus should be deleted.
    Or the paths may be grouped, and should be ungrouped first; that may also be seen in the Layers palette/Document info.

  • Joining Multiple Line Segments

    Is there a way to join any number of line segments into one continuous line?
    The end points overlap, but selecting all and going to Object>Path>Join seems to have no effect.
    Making a compound path helps, but doesn't allow me to smooth the final path.

    Joins multiple paths at nearest endpoints while respecting existing outboard handles:
    Joins multiple paths at nearest endpoints while retracting existing outboard handles:
    The scripts are described on and downloadable from
    this page.
    JET

  • Line segments in CWgraph

    Is it possible to draw multiple disconnected line segments as a single plot
    in CWgraph or do I need to
    implement these as separate plots. (if so, how many plots can I put on a
    graph??)
    Thanks
    SteveS

    I'm not sure exactly what you mean by disconnected line segments but I will give you a few suggestions based on what I think you mean.
    If you want to draw a bar chart, yes you can simulate this with one array of data and a single plot. To do this you can go to the Property pages of the CWGraph and select the Plots tab, from here change the line style drop down menu to XY Step and check the Fill to base and Lines checkboxes. Tada! you can see the style of your graph now resembles a bar chart. Now I know that the bars are all right up against one another, but if you want to get around this you can set the index that you would like a separation at to 0 so that basically that line is drawn at the origin. The other drawback is that if you want separate colors you will
    absolutely have to have separate plots one for each color, and I'm sure you can understand what to do here from what I've already said.
    Now the other thing I thought you might have meant was to just simply draw multiple irrelevant lines on one graph and the answer to this is yes as well. Just go to the Property pages for the graph and select the PLots tab and click the 'add' button to add more, they will all have their own settings for style and you can also associate them with different axes under the Axes tab.
    Other than that you will have to specify more exactly what it is you are looking for and if you aren't quite sure you can do quite a bit of research yourself by studying the ComponentWorks online help, the ComponentWorks examples in your Measurement Studio\VB\Samples directory, and by opening up the Object Browser in VB and looking at all of the properties and methods exposed by the CWGraph object for programmatic manipulation of the control.
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • Gap between line segments

    How do I set two line segments apart (at suppose 12%) of it's length no matter how large or small i resize the two line segments, sort of like the settings in ChemBioDraw 13.0 for anyone who have used this software ? For anyone with experience in ChemBioDraw 13.0 you can look into the draw settings and it will say how far apart the two lines in the double bond is, line width etc..etc.. Any ideas ? Thanks !

    ghostanime,
    When you use Effect>Distort & Transform>Transform>Move a copy, you still have just one line with a copy line at a certain horizontal distance from it, and that line will disappear if you click Reduce to Basic Appearance in ther Appearance palette/panel, and misbehave if you rotate; also, the original line will be what you are moving.
    When you Object>Expand Appearance, you will have two independent lines/objects instead.
    You may select and Group ((Ctrl/Cmd+G) whatever you wish to reuse, then copy and reuse as a unit, or even turn it into a Symbol.
    With the suggestion of using an Art Brush, you actually create such a unit for the double bond itself; I suggested that because you mentioned the wish to keep the proportions. You could also create the two lines as desired and group them; you should be aware that If you wish to change the size, you will have to tick Scale Strokes & Effects if you wish to keep all the proportions.
    Groups can form part of groups, so you can assemble building blocks (such as double bonds) into more complex bonds (such as molecules).
    Made as an Art Brush or as a Group, when you select the double bond, you will operate it by the centre between the two lines (presuming you have the Centre Reference Point selected in the Transform palette/Panel), with the effect you will operate it by the centre of the original path, which will be off.

  • Line Segment Intersection Checker

    Hello all,
    I am attempting to design a program that will take a set of n line segments and check which pairs of lines intersect. The lines are finite line segments, and they each have two end-points. I am supposed to be able to store a good amount of "Line Segments" into a data structure (Array, LinkedList, BinarySearchTree), etc. I am then supposed to be able to test each line segment against all of the other line segments that are read in in a text file in the format L1: (x,y),(x,y)
    I figured out how to test whether or not two finite line segments intersect, that is not the problem. What I am concerned with is the method(s) I can use to read in all of the line segments and then output the intersecting pairs of line segments in the form (L1,L2) means Line segment 1 and Line segment 2 intersect.
    I was thinking that reading the text file, I could just create an array with n slots that holds Line Segment objects (assuming I have created a Point class for keeping track of end-points), start with the first line segment in the array, and use the points from the first line segment's endpoints to all of the other line segment's endpoints in the array and check to see if they do intersect. Has anybody ever had to do something like this, and if so, what approach did you take to complete?
    Thanks in advance.

    Donojuana wrote:
    ... What I am concerned with is the method(s) I can use to read in all of the line segments and then output the intersecting pairs of line segments in the form (L1,L2) means Line segment 1 and Line segment 2 intersect.
    I was thinking that reading the text file, I could just create an array with n slots that holds Line Segment objects (assuming I have created a Point class for keeping track of end-points), start with the first line segment in the array, and use the points from the first line segment's endpoints to all of the other line segment's endpoints in the array and check to see if they do intersect.
    ...That sounds like a good plan.

  • ArrayList problem ....i can remove my object from my arrayList

    hi all, i am going to remove a object from my array by using arrayList.However, it can`t work properly and did nth for me..i don`t know why...could anyone give me some suggestion and show me what i did wrong on my code ....i stated more detail next to my code...plesae help...
    public class MusicCd
         private String musicCdsTitle;
            private int yearOfRelease;
         public MusicCd()
              musicCdsTitle = "";
              yearOfRelease = 1900;
         public MusicCd(String newMusicCdsTitle)
              musicCdsTitle = newMusicCdsTitle;
              //yearOfRelease = newYearOfRelease;
         public MusicCd(String newMusicCdsTitle, int newYearOfRelease)
              musicCdsTitle = newMusicCdsTitle;
              yearOfRelease = newYearOfRelease;
         public String getTitle()
              return musicCdsTitle;
         public int getYearOfRelease()
              return yearOfRelease;
         public void setTitle(String newMusicCdsTitle)
              musicCdsTitle = newMusicCdsTitle;
         public void setYearOfRelease(int newYearOfRelease)
              yearOfRelease = newYearOfRelease;
         public boolean equalsName(MusicCd otherCd)
              if(otherCd == null)
                   return false;
              else
                   return (musicCdsTitle.equals(otherCd.musicCdsTitle));
         public String toString()
              return("Music Cd`s Title: " + musicCdsTitle + "\t"
                     + "Year of release: " + yearOfRelease + "\t");
    import java.util.ArrayList;
    import java.io.*;
    public class MusicCdStore
       ArrayList<MusicCd> MusicCdList;
       public void insertCd()
            MusicCdList = new ArrayList<MusicCd>( ); 
            readOperation theRo = new readOperation();
            MusicCd theCd;
            int muiseCdsYearOfRelease;
            String muiseCdsTitle;
              while(true)
                    String continueInsertCd = "Y";
                   do
                        muiseCdsTitle = theRo.readString("Please enter your CD`s title : ");
                        muiseCdsYearOfRelease = theRo.readInt("Please enter your CD`s year of release : ");
                        MusicCdList.add(new MusicCd(muiseCdsTitle, muiseCdsYearOfRelease));
                        MusicCdList.trimToSize();
                        continueInsertCd = theRo.readString("Do you have another Cd ? (Y/N) : ");
                   }while(continueInsertCd.equals("Y") || continueInsertCd.equals("y") );
                   if(continueInsertCd.equals("N") || continueInsertCd.equals("n"));
                                                    //MusicCdList.add(new MusicCd(muiseCdsTitle, muiseCdsYearOfRelease));                              
                                  break;
                      //System.out.println("You `ve an invalid input " + continueInsertCd + " Please enter (Y/N) only!!");
       public void displayAllCd()
                    System.out.println("\nOur CD collection is: \n" );
              System.out.println(toString());
       public String toString( )
            String result= " ";
            for( MusicCd tempCd : MusicCdList)
                 result += tempCd.toString() + "\n";
            return result;
       public void searchingMusicCd()
            readOperation theRo = new readOperation();
            String keyword = theRo.readString("Enter a CD `s Title you are going to search : ") ;
            ArrayList<MusicCd> results = searchForTitle(keyword );
              System.out.println("The search results for " + keyword + " are:" );
              for(MusicCd tempCd : results)
                   System.out.println( tempCd.toString() );
       //encapsulate the A
       public void removeCd()
            readOperation theRo = new readOperation();
            String keyword = theRo.readString("Please enter CD `s title you are going to remove : ") ;
            ArrayList<MusicCd> removeMusicCdResult = new ArrayList<MusicCd>();
                  System.out.println("The CD that you just removed  is " + keyword );
              for(MusicCd tempCd : removeMusicCdResult)
                   System.out.println( tempCd.toString() );
       //problem occurs here : i am so confused of how to remove the exactly stuff from my arrayList
       //pls help
       private ArrayList<MusicCd> removeCdForTitle(String removeCdsTitle)
             MusicCd tempMusicCd = new MusicCd();
             tempMusicCd.setTitle(removeCdsTitle);
            // tempMusicCd.setTitle(removeCdsTitle);
            //tempMusicCd.getTitle() = removeCdsTitle;
            ArrayList<MusicCd> removeMusicCdResult = new ArrayList<MusicCd>();
            for(MusicCd currentMusicCd : MusicCdList)
                 if((currentMusicCd.getTitle()).equals(tempMusicCd.getTitle()))
                     // removeMusicCdResult.remove(currentMusicCd);
                         MusicCdList.remove(currentMusicCd);
            removeMusicCdResult.trimToSize();
            return removeMusicCdResult;
       private ArrayList<MusicCd> searchForTitle(String searchString)
            ArrayList<MusicCd> searchResult = new ArrayList<MusicCd>();
            for(MusicCd currentMusicCd : MusicCdList)
                 if((currentMusicCd.getTitle()).indexOf(searchString) != -1)
                      searchResult.add(currentMusicCd);
            searchResult.trimToSize();
            return searchResult;
    import java.util.*;
    public class MusicCdStoreEngine{
         public static void main(String[] args)
              MusicCdStore mcs = new MusicCdStore( );
              mcs.insertCd();
              //display the Cd that you just insert
              mcs.displayAllCd();
              mcs.removeCd();
              mcs.displayAllCd();
              mcs.searchingMusicCd();
    //Acutally result
    //Please enter your CD`s title : ivan
    //Please enter your CD`s year of release : 1992
    //Do you have another Cd ? (Y/N) : y
    //Please enter your CD`s title : hero
    //Please enter your CD`s year of release : 1992
    //Do you have another Cd ? (Y/N) : n
    //Our CD collection is:
    // Music Cd`s Title: ivan     Year of release: 1992
    //Music Cd`s Title: hero     Year of release: 1992     
    //Please enter CD `s title you are going to remove : hero
    //The CD that you just removed  is hero
    //Our CD collection is:
    // Music Cd`s Title: ivan     Year of release: 1992
    //Music Cd`s Title: hero     Year of release: 1992     
    //Enter a CD `s Title you are going to search : hero
    //The search results for hero are:
    //Music Cd`s Title: hero     Year of release: 1992
    //>Exit code: 0
    //Expected result
    //Please enter your CD`s title : ivan
    //Please enter your CD`s year of release : 1992
    //Do you have another Cd ? (Y/N) : y
    //Please enter your CD`s title : hero
    //Please enter your CD`s year of release : 1992
    //Do you have another Cd ? (Y/N) : n
    //Our CD collection is:
    // Music Cd`s Title: ivan     Year of release: 1992
    //Music Cd`s Title: hero     Year of release: 1992     
    //Please enter CD `s title you are going to remove : hero
    //The CD that you just removed  is hero
    //Our CD collection is:
    // Music Cd`s Title: ivan     Year of release: 1992
    //Music Cd`s Title: hero     Year of release: 1992<<-- it is not supposed to display cos i have deleted it from from array     
    //Enter a CD `s Title you are going to search : hero
    //The search results for hero are:
    //Music Cd`s Title: hero     Year of release: 1992<<-- i should have get this reuslt...cos it is already delete from my array
    //>Exit code: 0
    import java.util.*;
    public class readOperation{
         public String readString(String userInstruction)
              String aString = null;
              try
                         Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   aString = scan.nextLine();
              catch (NoSuchElementException e)
                   //if no line was found
                   System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
              catch (IllegalStateException e)
                   // if this scanner is closed
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aString;
         public char readTheFirstChar(String userInstruction)
              char aChar = ' ';
              String strSelection = null;
              try
                   //char charSelection;
                         Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   strSelection = scan.next();
                   aChar =  strSelection.charAt(0);
              catch (NoSuchElementException e)
                   //if no line was found
                   System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
              catch (IllegalStateException e)
                   // if this scanner is closed
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aChar;
         public int readInt(String userInstruction) {
              int aInt = 0;
              try {
                   Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   aInt = scan.nextInt();
              } catch (InputMismatchException e) {
                   System.out.println("\nInputMismatchException error occurred (the next token does not match the Integer regular expression, or is out of range) " + e);
              } catch (NoSuchElementException e) {
                   System.out.println("\nNoSuchElementException error occurred (input is exhausted)" + e);
              } catch (IllegalStateException e) {
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aInt;
    }

    //problem occurs hereI'm not sure that the problem does occur within the
    removeCdForTitle() method.
    Your main() method calls removeCd() which obtains the title of
    the CD to be removed (keyword). But remoceCd() never
    calls removeCdForTitle(), so nothing is ever removed.

  • How can you move the objects from one server to another?

    how can you move the objects from one server to another?

    Hi,
    Collecting objects for Transporting
    1. rsa1->transport connection
    2. left panel choose 'object type', middle panel choose 'infocube' and 'select objects'
    3. then choose your infocube and 'transfer'
    4. will go to right panel, choose collection mode 'manual' and grouping only 'necessary objects'
    5. after objects collection finished, create request
    6. If they are $TMP, then change the package.
    7. When you click the Save on the change package, it will prompt for transport. Here you can provide an existing open transport request number, or if you like here itself you can create a new one.
    8. You can check the request in SE09 to confirm.
    Releasing Transport Request  
    Lets say you are transporting from BWD to BWQ
    Step 1: In BWD go to TCode SE10
    Step 2: Find the request and release it (Truck Icon or option can be found by right click on request #)
    Note: First release the child request and then the parent request
    Steps below are to import transport (generally done by basis )
    Step 1: In BWQ go to Tcode STMS
    Step 2: Click on Import queue button
    Step 3: Double Click on the line which says BWQ (or the system into which transport has to be imported)
    Step 4: Click on refresh button
    Step 5: High light the trasnport request and import it (using the truck icon)
    Transport
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b5/1d733b73a8f706e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/0b/5ee7377a98c17fe10000009b38f842/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/224381ad-0701-0010-dcb5-d74236082bff
    Hope this helps.
    thanks,
    JituK

  • How can I fill a table of objects from cursor with select * bulk collect???

    Hi All, I have a TYPE as OBJECT
    create or replace type dept2_o as object (
    deptno NUMBER(2),
    dname VARCHAR2(14),
    loc VARCHAR2(13));
    I can fill a table of objects from cursor with out select * bulk collect...., row by row
    declare
    TYPE dept2_t IS TABLE of dept2_o;
    dept_o_tab dept2_t:=dept2_t();
    i integer;
    begin
    i:=0;
    dept_o_tab.extend(20);
    for rec in (select * from dept) loop
    i:=i+1;
    dept_o_tab(i):=dept2_o(
    deptno => rec.deptno,
    dname => rec.dname,
    loc =>rec.loc
    end loop;
    for k IN 1..i loop
    dbms_output.put_line(dept_o_tab(k).deptno||' '||dept_o_tab(k).dname||' '||dept_o_tab(k).loc);
    end loop;
    end;
    RESULT
    10 ACCOUNTING NEW YORK
    20 RESEARCH DALLAS
    30 SALES CHICAGO
    40 OPERATIONS BOSTON
    But I can't fill a table of objects from cursor with select * bulk collect construction ...
    declare
    TYPE dept2_t IS TABLE of dept2_o;
    dept_o_tab dept2_t:=dept2_t();
    begin
    dept_o_tab.extend(20);
    select * bulk collect into dept_o_tab from dept;
    end;
    RESULT
    ORA-06550: line 6, column 39;
    PL/SQL: ORA-00947: not enough values ....
    How can I fill a table of objects from cursor with select * bulk collect???

    create or replace type dept_ot as object (
    deptno NUMBER(2),
    dname VARCHAR2(14),
    loc VARCHAR2(13));
    create table dept
    (deptno number
    ,dname varchar2(14)
    ,loc varchar2(13)
    insert into dept values (10, 'x', 'xx');
    insert into dept values (20, 'y', 'yy');
    insert into dept values (30, 'z', 'zz');
    select dept_ot (deptno, dname, loc)
      from dept
    create type dept_nt is table of dept_ot
    declare
       l_depts dept_nt;
    begin
       select dept_ot (deptno, dname, loc)
         bulk collect
         into l_depts
         from dept
       for i in l_depts.first .. l_depts.last
       loop
          dbms_output.put_line (l_depts(i).deptno);
          dbms_output.put_line (l_depts(i).dname);
          dbms_output.put_line (l_depts(i).loc);    
       end loop;
    end;
    /

  • Problem with return a ColdFusion query object from a Java class

    Hi!
    I need to return a ColdFusion query object from a Java class
    using a JDBC result set ( java.sql.ResultSet);
    I have tried to pass my JDBC result set in to the constructor
    of the coldfusion.sql.QueryTable class with this code:
    ColdFusion code
    <cfset pra = createObject("java","QueryUtil").init()>
    <cfset newQuery = CreateObject("java",
    "coldfusion.sql.QueryTable")>
    <cfset newQuery.init( pra.getColdFusionQuery () ) >
    My java class execute a query to db and return QueryTable
    Java code (QueryUtil.java)
    import coldfusion.sql.QueryTable; // (CFusion.jar for class
    QueryTable)
    import com.allaire.cfx //(cfx.jar for class Query used from
    QueryTable)
    public class QueryUtil
    public static coldfusion.sql.QueryTable
    getColdFusionQuery(java.sql.ResultSet rs)
    return new coldfusion.sql.QueryTable(rs);
    but when i run cfm page and coldfusion server tries to
    execute : "<cfset pra =
    createObject("java","QueryUtil").init()>" this error appears:
    Object Instantiation Exception.
    An exception occurred when instantiating a java object. The
    cause of this exception was that: coldfusion/sql/QueryTable.
    If i try to execute QueryUtil.java with Eclipse all it works.
    Also I have tried to return java.sql.ResultSet directly to
    coldfusion.sql.QueryTable.init () with failure.
    Do you know some other solution?

    ok
    i print all my code
    pratica.java execute a query to db and return a querytable
    java class
    import java.util.*;
    import java.sql.*;
    import coldfusion.sql.*;
    public class Pratica {
    private HashMap my;
    private String URI,LOGIN,PWD,DRIVER;
    private Connection conn=null;
    //funzione init
    //riceve due strutture converite in hashmap
    // globals
    // dbprop
    public Pratica(HashMap globals,HashMap dbprop) {
    my = new HashMap();
    my.put("GLOBALS",globals);
    my.put("DBPROP",dbprop);
    URI = "jdbc:sqlserver://it-bra-s0016;databaseName=nmobl";
    LOGIN = "usr_dev";
    PWD = "developer";
    DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
    try{
    // Carico il driver JDBC per la connessione con il database
    MySQL
    Class.forName(DRIVER);
    /* Connessione alla base di dati */
    conn=DriverManager.getConnection(URI,LOGIN,PWD);
    if(conn!=null) System.out.println("Connection Successful!");
    } catch (ClassNotFoundException e) {
    // Could not find the database driver
    System.out.print("\ndriver non trovato "+e.getMessage());
    System.out.flush();
    catch (SQLException e) {
    // Could not connect to the database
    System.out.print("\nConnessione fallita "+e.getMessage());
    System.out.flush();
    //funzione search
    //riceve un hash map con i filtri di ricerca
    public QueryTable search(/*HashMap arg*/) {
    ResultSet rs=null;
    Statement stmt=null;
    QueryTable ret=null;
    String query="SELECT * FROM TAN100pratiche";
    try{
    stmt = conn.createStatement();// Creo lo Statement per
    l'esecuzione della query
    rs=stmt.executeQuery(query);
    // while (rs.next()) {
    // System.out.println(rs.getString("descrizione"));
    catch (Exception e) {
    e.printStackTrace();
    try {
    ret = Pratica.RsToQueryTable(rs);
    } catch (SQLException e) {
    e.printStackTrace();
    this.close();
    return(ret);
    // ret=this.RsToQuery(rs);
    // this.close(); //chiude le connessioni,recordset e
    statament
    //retstruct CF vede HashMap come struct
    //METODO DI TEST
    public HashMap retstruct(){
    return(my);
    //conversione resultset to querytable
    private static QueryTable RsToQueryTable(ResultSet rs)
    throws SQLException{
    return new QueryTable(rs);
    //chiura resultset statament e connessione
    private void close(){
    try{
    conn.close();
    conn=null;
    catch (Exception e) {
    e.printStackTrace();
    coldfusion code
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN">
    <html>
    <head>
    <title>Test JDBC CFML Using CFScript</title>
    </head>
    <body>
    <cftry>
    <cfset glb_map =
    createObject("java","java.util.HashMap")>
    <cfset dbprop_map =
    createObject("java","java.util.HashMap")>
    <cfset glb_map.init(glb)> <!---are passed from
    another page--->
    <cfset dbprop_map.init(glb["DBPROP"])>
    <cfset pra =
    createObject("java","Pratica").init(glb_map,dbprop_map)>
    <cfset ourQuery
    =createObject("java","coldfusion.sql.QueryTable").init(pra.search())>
    <cfcatch>
    <h2>Error - info below</h2>
    <cfdump var="#cfcatch#"><cfabort>
    </cfcatch>
    </cftry>
    <h2>Success - statement dumped below</h2>
    <cfdump var="#ourQuery#">
    </body>
    </html>
    error at line <cfset pra =
    createObject("java","Pratica").init(glb_map,dbprop_map)>
    An exception occurred when instantiating a java object. The
    cause of this exception was that: coldfusion/sql/QueryTable.
    -----------------------------------------------------------------------

  • How to Use AccessibleObjectFromWindow API in VBA to Get Excel Application Object from Excel Instance Window Handle

    I need to get the Excel.application object from a window handle using AccessibleObjectFromWindow. I can't seem to make the code work. First, I successfully search for the XLMAIN windows. Then, when I get a handle, I execute the AccessibleObjectFromWindow
    function. It seems to return a value of -2147467262 in all cases. Therefore, I believe that it is returning an error value. I can't figure out how to determine the meaning of this value.
    If it is an error value, I believe that one or more arguments are in error. My best guess at present is that the GUID argument is incorrect. I have tried two GUID values: {00020400-0000-0000-C000-000000000046} and {90140000-0016-0409-0000-0000000FF1CE}.
    I have seen both used in conjunction with OBJID_NATIVEOM. Neither one seems to work. I really would prefer not to use the second one as it has an Excel major and minor version number. I would hate to have to change this code, if a new minor version appeared.
    The attached code has been commented to show which parts have been shown to work and which not. I'm at my wits end and really need help.
    Thanks
    'This module is located in Access 2010, but this is an Excel question.
    Option Compare Database
    Option Explicit
    ' Module-Level Declarations
    'The GetDesktopWindow function and FindWindowEx function work just fine.
    Public Declare Function GetDesktopWindow Lib "user32" () As Long
    Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
    (ByVal hWnd1 As Long, _
    ByVal hWnd2 As Long, _
    ByVal lpsz1 As String, _
    ByVal lpsz2 As String) _
    As Long
    'I'm not getting the expected output from this function (see below)
    Private Declare Function AccessibleObjectFromWindow& Lib "oleacc.dll" _
    (ByVal hwnd&, _
    ByVal dwId&, _
    riid As GUID, _
    xlwb As Object)
    Type GUID
    lData1 As Long
    iData2 As Integer
    iData3 As Integer
    aBData4(0 To 7) As Byte
    End Type
    Function ExcelInstances() As Long
    ' Procedure-Level Declarations
    ' Value of OBJID_NATIVEOM verified by checking list of Windows API constants _
    on this site: http://www.lw-tech.com/q1/base.htm
    Const OBJID_NATIVEOM = &HFFFFFFF0
    Dim hWndDesk As Long 'Desktop window
    Dim hWndXL As Long 'Child window
    Dim objExcelApp As Object 'Final result wanted: Excel application object
    'Following variable (xlapp) to be set by AccessibleObjectFromWindow function
    Dim xlapp As Object
    Dim IDispatch As GUID 'GUID used in call to AccessibleObjectFrom Window function
    'Set up GUID to be used for all instances of Excel that are found
    Dim tmp1 As Variant 'Return value from AccessibleObjectFromWindow
    ' Executable Statements
    SetIDispatch IDispatch
    IDispatch = IDispatch
    'Get a handle to the desktop
    hWndDesk = GetDesktopWindow 'This seems to work
    Do
    'Get the next Excel window
    'The following statement seems to work. We are finding and counting _
    correctly all the instances of Excel. hWndXL is non-zero for each _
    instance of Excel
    hWndXL = FindWindowEx(GetDesktopWindow, hWndXL, "XLMAIN", vbNullString)
    'If we got one, increment the count
    If hWndXL > 0 Then
    'This works. We correctly count all _
    instances of Excel
    ExcelInstances = ExcelInstances + 1
    'Here is the problem. The following statement executes and returns a value of _
    -2147467262. xlapp, which is passed by reference to AccessibleObjectFromWindow, _
    is set to nothing. It should be set to the object for Excel.application. _
    I believe that this value is not an object. I tried to reference tmp1. in the _
    immediate window. There was no Intellisense.
    'I think that the function in returning an error value, but I can't figure _
    out what it is. I believe that AccessibleObjectFromWindow returns error _
    values, but I don't know where to find their values so I can interpret the _
    function's results.
    'As best I can tell, the hWndXL parameter is correct. It is the handle for _
    an instance of Excel. OBJID_NATIVEOM is set correctly (see constant declaration _
    above). xlapp is passed by reference as a non-initialized object variable, which _
    will be set by AccessiblObjectFromWindow. IDispatch may be the problem. It is set _
    as shown below in the procedure SetIDispatch(ByRef ID As GUID). This procedure _
    appears to work. I can see that IDispatch is set as I intended and correctly _
    passed to AccessibleObjectFromWindow.
    tmp1 = AccessibleObjectFromWindow(hWndXL, OBJID_NATIVEOM, IDispatch, xlapp)
    'Need to write code to test tmp1 for error. If none, then set objExcelApp = _
    object. Also, I exect xlapp to be set to Excel.application
    End If
    'Loop until we've found them all
    Loop Until hWndXL = 0
    End Function
    Private Sub SetIDispatch(ByRef ID As GUID)
    'Defines the IDispatch variable. The interface _
    ID is {90140000-0016-0409-0000-0000000FF1CE}.
    'NOT USING {00020400-0000-0000-C000-000000000046}, _
    which could be the problem
    '9 is release version - first version shipped (initial release)
    '0 is release type - retail/oem
    '14 is major version
    '0000 is minor version
    '0016 is product ID - MS Excel 2010
    '0409 is language identifier - English
    '0 is x86 or x64 - this is x86
    '000 reserved
    '0 is debug/ship
    '000000FF1CE is office family ID
    With ID
    .lData1 = &H90140000
    .iData2 = &H16
    .iData3 = &H409
    .aBData4(0) = &H0
    .aBData4(1) = &H0
    .aBData4(2) = &H0
    .aBData4(3) = &H0
    .aBData4(4) = &H0
    .aBData4(5) = &HF
    .aBData4(6) = &HF1
    .aBData4(7) = &HCE
    End With
    End Sub
    DaveInCalabasas

    I don't think you can return a reference to Excel's main window like that as you are attempting to do.
    Ref:
    http://msdn.microsoft.com/en-us/library/windows/desktop/dd317978(v=vs.85).aspx 
    It's relatively straightforward to return any workbook's window in any given instance, and in turn it's parent Excel app. Try the following and adapt as required (and include error handling) -
    Option Explicit
    Private Declare Function FindWindowEx Lib "User32" Alias "FindWindowExA" _
    (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, _
    ByVal lpsz2 As String) As Long
    Private Declare Function IIDFromString Lib "ole32" _
    (ByVal lpsz As Long, ByRef lpiid As GUID) As Long
    Private Declare Function AccessibleObjectFromWindow Lib "oleacc" _
    (ByVal hWnd As Long, ByVal dwId As Long, ByRef riid As GUID, _
    ByRef ppvObject As Object) As Long
    Private Type GUID
    Data1 As Long
    Data2 As Integer
    Data3 As Integer
    Data4(7) As Byte
    End Type
    Private Const S_OK As Long = &H0
    Private Const IID_IDispatch As String = "{00020400-0000-0000-C000-000000000046}"
    Private Const OBJID_NATIVEOM As Long = &HFFFFFFF0
    Sub test()
    Dim i As Long
    Dim hWinXL As Long
    Dim xlApp As Object ' Excel.Application
    Dim wb As Object ' Excel.Workbook
    hWinXL = FindWindowEx(0&, 0&, "XLMAIN", vbNullString)
    While hWinXL > 0
    i = i + 1
    Debug.Print "Instance_" & i; hWinXL
    If GetXLapp(hWinXL, xlApp) Then
    For Each wb In xlApp.Workbooks
    Debug.Print , wb.Name
    Next
    End If
    hWinXL = FindWindowEx(0, hWinXL, "XLMAIN", vbNullString)
    Wend
    End Sub
    'Function GetXLapp(hWinXL As Long, xlApp As Excel.Application) As Boolean
    Function GetXLapp(hWinXL As Long, xlApp As Object) As Boolean
    Dim hWinDesk As Long, hWin7 As Long
    Dim obj As Object
    Dim iid As GUID
    Call IIDFromString(StrPtr(IID_IDispatch), iid)
    hWinDesk = FindWindowEx(hWinXL, 0&, "XLDESK", vbNullString)
    hWin7 = FindWindowEx(hWinDesk, 0&, "EXCEL7", vbNullString)
    If AccessibleObjectFromWindow(hWin7, OBJID_NATIVEOM, iid, obj) = S_OK Then
    Set xlApp = obj.Application
    GetXLapp = True
    End If
    End Function
    Note as written if an instance does not have any loaded workbooks a reference will not be returned (though a workbook can be added using DDE, but convoluted!)
    FWIW there are two other very different approaches to grab all running Excel instances though something along the lines of the above is simplest.
    Peter Thornton

Maybe you are looking for

  • Full screen firewire preview... before capturing

    hi there. i'm new here. i'm trying to find a way to connect a cam to my mac and be able to have full screen live feedback and then (as seamlessly as possible) start a pre-recorded material of the same situation. this is for a performace i'm tryin to

  • Why won't my ipod charge overnight? It takes FOREVER.....

    Hey. Have an ipod nano. I am really enjoying it- great for at the gym. When it runs down and I plug it in and go to bed- it is still not charged by morning??? It seems like I must be at the computer the entire time for it to continue? Is it my comput

  • The Scan does not appear in HP Solution Center

    My HP4180 Solution Center does not show a scan option on it but it has the capability to scan for some reason it disappeared when an update was done how do I get this back on the Solution Center?

  • DataModel, SelectItem(s) Reading data twice - selection consistency

    Hello, I have some concerns regarding the way how selected item in selectone_menu or command_link/command_button inside of data_table get resolved on submit. I am very new to JSF so I might misunderstood how it works and will be grateful for your com

  • Drag and Drop in Web dynpro ALV

    I have a requirement in wda where I am supposed to select few records from source table and drop it in target table. The dropped records should be inserted at the right index /destination, dropped at.  I see SAP examples but they are all associated w