CadTutor Tutorials: https://www.cadtutor.net/tutorials/autocad/index.php?category_id=25
Also search Youtube. There are lots of videos: https://www.youtube.com/results?search_query=autocad+3d
Autocad has a Z dimension that is vertical with relation to the traditional 2d coordinate system (X, Y).
There are multiple ways of modeling objects in 3D in Autocad.
Check out the tutorials section of the website and scroll down to "3D Basics".
That should get you pointed in the right direction.
There are tons of Autocad 3D modeling videos and walkthroughs online also.
-ChriS
Like Emmanuel if preloaded.
(defun c:ASR (from to / ss i atts blk a tag val newval)
remove (setq from "AZERTY")
remove (setq to "QUERTY")
open dwg1 (c:asr "AZERTY" "QUERTY") close Y
open dwg2 (c:asr "AZERTY" "QUERTY") close Y
open dwg3 (c:asr "AZERTY" "QUERTY") close Y
You could use a function such as my String to List function to convert the string to a list using a supplied token, for example:
(defun c:desenha2 ( / des lst str txt )
(if (setq txt (getfiled "Esse é o título da cx de diálogo" (strcat (getvar 'dwgprefix) (vl-filename-base (getvar 'dwgname))) "txt" 8))
(if (setq des (open txt "r"))
(progn
(while (setq str (read-line des))
(setq lst (cons (LM:str->lst str ";") lst))
)
(close des)
(if
(setq lst
(vl-remove nil
(mapcar
(function
(lambda ( i / n x y )
(if
(and
(wcmatch (car i) "PV*")
(setq n (atoi (substr (car i) 3)))
(setq x (distof (cadr i) 2))
(setq y (distof (caddr i) 2))
)
(list n 10 x y)
)
)
)
lst
)
)
)
(entmake
(append
(list
'(000 . "LWPOLYLINE")
'(100 . "AcDbEntity")
'(100 . "AcDbPolyline")
(cons 90 (length lst))
'(070 . 0)
)
(mapcar 'cdr (vl-sort lst '(lambda ( a b ) (< (car a) (car b)))))
)
)
)
)
(princ "\nUnable to open file for reading.")
)
(princ "\n*Cancel*")
)
(princ)
)
;; String to List - Lee Mac
;; Separates a string using a given delimiter
;; str - [str] String to process
;; del - [str] Delimiter by which to separate the string
;; Returns: [lst] List of strings
(defun LM:str->lst ( str del / pos )
(if (setq pos (vl-string-search del str))
(cons (substr str 1 pos) (LM:str->lst (substr str (+ pos 1 (strlen del))) del))
(list str)
)
)
(princ)
Hi,
An example of how to convert a list of strings to a list of coordinates based on your list if your list is always with the same form.
(foreach str '("PV1;2;2" "PV2;6;6" "PV3;8;10")
(setq lst (cons (read (strcat "(" (vl-string-translate ";" "," (substr str 5)) ")")) lst))
)
You need to reverse the list afterwards.