Hello Henrique ,
Thank you very much for your replay. I've attached some codes and DWG FILE ( 3d Solid object ) which is similar to what we are trying to do. Below is some of my respond;
- expects only one 'lwpolyline' in WCS in the dwg-
-There will be only one closed Polyline at the beginning.
- expects the 'lwpolyline' with a layer 'xxx_#'
- New PLINE layer Will be layer 'xxx_#' , Original PLINE layer will change to " Hidden"
- don't deals with the 'TXT_##' layer color (I could not find a relationship between the 'TXT_##' layer color color, and the 'TXT_##' layer color)
-TXT_##' layer is a new layer. could've same colors same as Type_##' layer color
- don't deals with the text style you have in the 'sample.dwg'
-Text style is Romans.shx
don't deals with the linetype scale in the layer 'Hidden'
Hidden linetype scale is 11.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(DEFUN C:3Point Align ( / wtxt1 e i x ss)
(command "-Style" "0-GBal" "SWISSLI.ttf" "" "" "" "N" "N" "")
(command "-layer" "m" "0-GBal" "")
(command "-layer" "s" "0-GBal" "")
(if (not align) (arxload "geom3d" T))
(SETQ SS1 (SSGET))
(SETQ PT1 (GETPOINT "\nPick 1st Source Point (0,0)")
PT2 (GETPOINT "\nPick 2nd Source Point (1,0)")
PT3 (GETPOINT "\nPick 3rd Source Point (0,1)")
D1 (LIST 0.0 0.0 0.0)
D2 (LIST 1.0 0.0 0.0)
D3 (LIST 0.0 1.0 0.0)
)
(ALIGN SS1 PT1 D1 PT2 D2 PT3 D3)
(command "explode" "all")
(setvar "peditaccept" 0)
(command ".pedit" "m" "all" "" "y" "j" "0" "")
(if (or (null ofd)
(/= (type ofd) 'REAL)
)
(setq ofd 74.)
)
(if (setq ss (ssget "all"))
(repeat (setq i (sslength ss))
(setq e (vlax-ename->vla-object (ssname ss (setq i (1- i)))))
(if (vlax-method-applicable-p e 'Offset)
(vl-every '(lambda (x) (vl-catch-all-apply 'vla-offset (list e x))) (list ofd (- ofd)))
)
)
)
(command "zoom" "e")
(command ".erase" "all" "r" "p" "r" "l" "")
(setvar "CMDECHO" 0)
(initget 1)
(entmake '((0 . "TEXT") (40 . 99) (1 . "TYPE - 01")(10 165.0 725.0 0.0)))
(entmake '((0 . "TEXT") (40 . 99) (1 . "Pcs - 01")(10 165.0 560.0 0.0)))
(setvar "clayer" "0")
(setvar "celtype" "bylayer")
(setvar "CECOLOR" "bylayer")
(setvar "CELWEIGHT" -1)
(princ)
)