• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Inventor

    Reply
    Valued Mentor
    Ktelang
    Posts: 268
    Registered: ‎09-23-2010
    Accepted Solution

    Get Coordinates of workpoint using ilogic

    128 Views, 2 Replies
    03-05-2013 01:35 PM

    Hello Everybody,

     

    How to get coordinates of a workpoint using iLogic.

    can anyone help me with this

     

    Thanks

    ------------------------------------------------------------------------------
    Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
    Inventor 2013 and Vault Basic 2013
    -----------------------------------------------------------------------------
    Please use plain text.
    *Expert Elite*
    Curtis_Waguespack
    Posts: 1,933
    Registered: ‎03-08-2006

    Re: Get Coordinates of workpoint using ilogic

    03-05-2013 02:28 PM in reply to: Ktelang

    Hi  Ktelang,

     

    Here's a quick example for working with workpoints.

    I hope this helps.
    Best of luck to you in all of your Inventor pursuits,
    Curtis
    http://inventortrenches.blogspot.com

     

    Dim oDoc As Document
    oDoc = ThisApplication.ActiveDocument

    Dim oTG As TransientGeometry
    oTG = ThisApplication.TransientGeometry
    Dim oWorkPoint As WorkPoint

    'create a workpoint
    oWorkPoint = oDoc.ComponentDefinition.WorkPoints.AddFixed(oTG.CreatePoint(1.123, 1.124, 1.125))
    'display the new workpoint's coordinates
    MessageBox.Show(oWorkPoint.Point.X  &", "&  oWorkPoint.Point.Y &", "&  oWorkPoint.Point.Z, "iLogic1")

    'identify the first point in the workpoints collection aka the origin point
    oWP = oDoc.ComponentDefinition.WorkPoints(1)
    'display the first workpoint's coordinates
    MessageBox.Show(oWP.Point.X  &", "&  oWP.Point.Y &", "&  oWP.Point.Z, "iLogic2")

    'display a named workpoint's coordinates
    oWP1 = oDoc.ComponentDefinition.WorkPoints("Work Point1")
    'display the first workpoint's coordinates
    MessageBox.Show(oWP1.Point.X  &", "&  oWP1.Point.Y &", "&  oWP1.Point.Z, "iLogic3")


      solution.png  Did you find this reply helpful ? If so please use the Accept as Solution or  Kudos button below.

    Please use plain text.
    Valued Mentor
    Ktelang
    Posts: 268
    Registered: ‎09-23-2010

    Re: Get Coordinates of workpoint using ilogic

    03-11-2013 09:15 AM in reply to: Curtis_Waguespack

    Thanks Curtis

    It helped

     

     

    ------------------------------------------------------------------------------
    Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
    Inventor 2013 and Vault Basic 2013
    -----------------------------------------------------------------------------
    Please use plain text.