API Selection Help

Discussion in 'SolidWorks' started by Hacknwhack, Jun 22, 2005.

  1. Hacknwhack

    Hacknwhack Guest

    Hi all,

    Looking at the API once again, and a small portion of my macro deals with
    using a plane, created in the macro, to insert a sketch with a circle at its
    origin.

    I have recorded a macro doing what I want but am confused by part of it

    boolstatus = Part.Extension.SelectByID2("Point1@3DSketch01",
    "EXTSKETCHPOINT", 0.006690360006824, 4.318000004404E-04, 0.1828723801865,
    False, 0, Nothing, 0)

    This particular line is selecting the origin of the plane. I'm not sure as
    to why it is necessary to use both the object name and the XYZ coordinates
    to adaquately define my selection. I will not know the coords of the point
    in my macro however I'm sure I could obtain them, however I was wondering if
    I could simply just provide the name, which I define and if so, what would
    the proper syntax be without the coords.

    Thanks
    -hack
     
    Hacknwhack, Jun 22, 2005
    #1
  2. Hacknwhack

    TOP Guest

    I think you will find that the coordinates can be left blank or zero as
    long as you have the entity name.
     
    TOP, Jun 22, 2005
    #2
  3. Hacknwhack

    Tin Man Guest

    "EXTSKETCHPOINT" means that you selected a point that was contained in
    a *different* sketch. I thought you said you wanted to insert a circle
    at the origin? Looks like you picked a piont from a 3D sketch, not the
    origin.

    Ken
     
    Tin Man, Jun 22, 2005
    #3
  4. Hacknwhack

    VJN Guest

    hi,


    could u try this
    boolstatus = Part.Extension.SelectByID2("Po­int1@3DSketch01",
    "EXTSKETCHPOINT", 0, 0, 0,
    False, 0, Nothing, 0)

    Reply me

    vijayan
     
    VJN, Jun 22, 2005
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.