Results 1 to 1 of 1

Thread: Insert a block with attribute value from selected polyline

  1. #1
    Join Date
    Login to Give a bone

    Default Insert a block with attribute value from selected polyline

    This is a small routine to insert a block with attributes. the idea is to select a polyline with elevation, then insert the block, the elevation of the polyline is the value for the block attribute. I need help to make this routine work. i can select the polyline but then the routine crashes....

    (defun eplat (/ ITEM1 ITEM2 xval2 yval2)
      (setq precision (getvar "precisa"))   
      (setvar "precisa" 2)                  
      (setq ITEM1 (getpoint "\nSeleccione Plataforma: "))
      (setq ztext (rtos (caddr ITEM1)))     
      (setq ITEM2 (getpoint "\nIndique Ubicación: "))
      (setq xval2 (car ITEM2))
      (setq yval2 (cadr ITEM2))
      (setq txtloc (list xval2 yval2))
      (setvar ATTREQ 1)
      (setvar ATTDIA 0)
      (command "-insert" "eplat" txtloc "1" "1" "0" ztext)
      (setvar ATTDIA 1)
      (setvar "precisa" precision)
    Attached Files Attached Files
    Last edited by Opie; 2015-03-20 at 12:34 PM. Reason: [code] tags added

Similar Threads

  1. insert block on polyline
    By ezhilanand10674421 in forum AutoLISP
    Replies: 4
    Last Post: 2015-08-11, 02:37 AM
  2. How to change dynamic block attribute default values based on block selected?
    By zeirz109180 in forum Dynamic Blocks - Technical
    Replies: 2
    Last Post: 2013-12-13, 02:20 PM
  3. Insert a Block at each point along a Polyline
    By DMoore.67173 in forum AutoLISP
    Replies: 34
    Last Post: 2010-10-24, 09:25 AM
  4. VBA project - draw a line of polyline, then insert a block
    By jbortoli in forum VBA/COM Interop
    Replies: 0
    Last Post: 2007-05-14, 08:01 AM
  5. Block attribute text size is incorrect when the Block is not selected
    By lwhitney.133796 in forum AutoCAD General
    Replies: 3
    Last Post: 2007-02-16, 10:01 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