Results 1 to 2 of 2

Thread: Please help me....calculate area and perimeter

  1. #1
    Member
    Join Date
    2009-04
    Posts
    10
    Login to Give a bone
    0

    Default Please help me....calculate area and perimeter

    I want to calculate area and perimeter with just typing text inside object boundary. The result is atttribute block (block name QTY.dwg). I had modified some lisp program (My_program.lsp). But i have some problem :
    1. When text is outside of boundary, program halt.
    2. Program run slowly if calculate more than 100 objects.
    3. Insertion points of atts block some times different with texts.
    Can anyone solve my problems.
    Sorry for lack of my english.
    Attached Files Attached Files

  2. #2
    I could stop if I wanted to
    Join Date
    2002-08
    Posts
    231
    Login to Give a bone
    0

    Default Re: Please help me....calculate area and perimeter

    For 1 and 2 with your exemple

    change in (defun getarea):

    (vl-cmdf "_.-Boundary" txt-posn "")
    (if (entlast)
    ....
    to
    (setq e_last (entlast))
    (vl-cmdf "_.-Boundary" "_advanced" "_boundary" "_new" (ssget "_X" '((0 . "LWPOLYLINE") (8 . "0"))) "" "" txt-posn "")
    (if (eq e_last (entlast)) (setq e_last nil) (setq e_last (entlast)))
    (if e_last
    .....

    and
    (progn
    (Alert "Boundary cannot created")
    (quit)
    )
    to
    (progn
    (Alert "Boundary cannot created")
    )

    For 3 see OSMODE ?
    don't forget ATTDIA & ATTREQ in your lisp

Similar Threads

  1. Calculate Opening Area
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2013-10-28, 11:45 AM
  2. Calculate for net wall area
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2012-08-20, 02:32 PM
  3. 2012: Is it possible to display a floors perimeter and area in a tag?
    By ruth.clayton728068 in forum Revit Architecture - General
    Replies: 0
    Last Post: 2012-06-15, 09:36 AM
  4. Calculate Rentable Area
    By pfaudler in forum Revit - API
    Replies: 1
    Last Post: 2012-04-19, 10:57 PM
  5. Area and Perimeter tools
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2005-10-21, 12:40 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
  •