Code Red > AutoLISP (Vanilla / Visual)

lisp to make custom data extraction

(1/4) > >>

Mostafa Hisham:
Hello every one …
I have a video to explain what I need and I'll explain that
I need to make a lisp to custom dx that get the items i need {layer,name,count,lenght,area,toc,....as the video show} arrangement of these items is important
and put the table in the drawing with scale 1000 -because drawing unit is mm- and also the table in an excel sheet with the same name of drawing

can some one help me about that ??
thanks in advance

https://youtu.be/H2Eqnekil5o

BIGAL:
There is no problem in making custom data extract, the problem is that it will probably be a custom lisp to suit your needs, make a table yes, export to excel yes.

The issue is the rules layer,name,count,lenght,area how big this ends up depends on you. The obvious what objects are to be selected.

People like me are happy to provide solutions but this is sounding like a need to make a donation for some to be written. A fee for service.

If you want 1 type of object a example, then what layers and so on.


--- Code: ---(defun c:test ( / obj len area lay)
(if (setq ss (ssget "X" '((0 . "LWPOLYLINE"))))
  (progn
  (repeat (setq x (sslength ss))
    (setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1)))))
    (setq len (vla-get-length obj))
    (setq lay (vla-get-layer obj))
    (setq area (vla-get-area obj))
    (princ (strcat "\nLayer = " lay " Length = " (rtos len 2 1) " Area = " (rtos area 2 0)))
  )
  )
)
(princ)
)

--- End code ---

Mostafa Hisham:
thanks sir about that....
I have no problem about paying money to get what I want …..
and also i have a lot of ideas to make by lisp to achieve my requires …. 

BIGAL:
Happy to provide some more information about how much time involved in doing a custom extract.

There are many of us who can do custom work.

What is needed is some guide as to what data your trying to export.

eg1
list of layers
Lines, Arcs, plines = length and areas, individual or sum by layer name

eg2
List of hatches = Area, individual or sum by layer name

A sample small dwg and a list of what to export. The dwg will show the industry your in.



Mostafa Hisham:
okay Sir
this is a drawing
here you are the DWG
I Put the table which i need to make like
and arrangement of columns as i make is important
and i want it to be exported to excel and have the same name of the DWG file
and scale the table in auto-cad by 500 for example because my dwg unit is mm
also sort layer column from A to Z
and another request sir ...
 in the photo that i attached the values in (TOC-H-FLOOR-CLIENT-PROJECT-BRANCH) columns are constant and repeated in every row can you make it to be written in one row only and don't be repeated ...


Finally thanks for you

Navigation

[0] Message Index

[#] Next page

Go to full version