+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Senior Member ziele_o2k's Avatar
    Discipline
    Construction
    Using
    AutoCAD 2018
    Join Date
    Jun 2014
    Location
    Poland
    Posts
    128

    Default Quick question about block insertion point

    Registered forum members do not see this ad.

    Hi,
    I'm playing with blocks data extraction. I just want to be sure.
    The best way to get block insertion point in WCS/UCS is:
    For ename:
    Code:
    (trans (cdr (assoc 10 (entget _ent))) _ent 0) ;WCS
    (trans (cdr (assoc 10 (entget _ent))) _ent 1) ;UCS
    For vla-object:
    Code:
    (vla-get-InsertionPoint _obj) ;WCS
    (trans (vla-get-InsertionPoint _obj) 0 1) ;UCS

  2. #2
    Super Member hanhphuc's Avatar
    Using
    AutoCAD 2007
    Join Date
    Apr 2013
    Location
    Happy Garden
    Posts
    655

    Default

    Code:
    (vla-get-InsertionPoint _obj)
    not sure if ac2018 trans can pass argument as variant value?

    Code:
    (vlax-get _obj 'InsertionPoint)
    This returns a list
    _$ ( apply 'equal "hp" "happy" "hạnh phúc" "ハッピー" "幸福" "행복" )
    ; error: too many arguments

  3. #3
    Senior Member ziele_o2k's Avatar
    Discipline
    Construction
    Using
    AutoCAD 2018
    Join Date
    Jun 2014
    Location
    Poland
    Posts
    128

    Default

    Ofcourse, vla-get-InsertionPoint returns variant.
    That was only mental shortcut.
    Correct version is:
    Code:
     (vlax-safearray->list(vlax-variant-value(vla-get-InsertionPoint  _obj)))

  4. #4
    Full Member
    Discipline
    Surveying
    dlanorh's Discipline Details
    Occupation
    Geospatial Engineer
    Discipline
    Surveying
    Using
    AutoCAD 2012
    Join Date
    Aug 2017
    Location
    UK/Bundesrepublik Deutschland
    Posts
    65

    Default

    Registered forum members do not see this ad.

    Code:
    (vlax-get _obj 'insertionpoint)
    will return a list

Similar Threads

  1. Lee Mac's InsertWithState program - Insertion point question
    By LosGirk in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 21st Mar 2018, 09:53 pm
  2. Quick question re: block insertion
    By oftenly in forum AutoCAD Drawing Management & Output
    Replies: 12
    Last Post: 21st Oct 2016, 10:07 pm
  3. modifying the insertion point in a block
    By igreere in forum AutoCAD Beginners' Area
    Replies: 9
    Last Post: 24th Nov 2013, 12:48 am
  4. Block Insertion Point
    By neekcotrack in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 11th Aug 2008, 08:46 pm
  5. Block Insertion Point
    By Thaumaturge in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 15
    Last Post: 30th May 2008, 09:52 am

Bookmarks

Posting Permissions

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