Results 1 to 2 of 2

Thread: how to get x and y coordinates of selected shape

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2014-12
    Posts
    1
    Login to Give a bone
    0

    Default how to get x and y coordinates of selected shape

    Hello how to get x y coordinates of selected object in alertbox ?

  2. #2
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,109
    Login to Give a bone
    0

    Default Re: how to get x and y coordinates of selected shape

    Assuming the object you are referring to is a block.

    P=

    Code:
    (defun C:Alert (/ entSelection lstSelection objSelection)
     (vl-load-com)
     (and
      (setq lstSelection (entsel "\nSelect Object: "))
      (setq entSelection (car lstSelection))
      (setq objSelection (vlax-ename->vla-object entSelection))
      (vlax-property-available-p objSelection "InsertionPoint")  
      (alert (vl-princ-to-string (vlax-get objSelection "insertionpoint")))
     )
    )
    AutomateCAD

Similar Threads

  1. 2012: Conc Beam - Cut shape? Edit shape?
    By tedg in forum Revit Structure - General
    Replies: 5
    Last Post: 2013-03-28, 03:16 PM
  2. AutoPopulate a selected polyline shape
    By Darren Allen in forum AutoLISP
    Replies: 2
    Last Post: 2011-11-21, 06:36 PM
  3. Replies: 3
    Last Post: 2010-03-01, 06:23 PM
  4. Allow shared coordinates to be used in topo and roof/floor shape edit points
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2008-05-22, 04:36 AM
  5. Missing Shape Files / Select Shape File
    By Mac Demer in forum AutoCAD General
    Replies: 7
    Last Post: 2006-11-05, 01:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •