- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm not a specialist in lisp, but I need to use it, so I took the lisp from Autodesk samples and changed it
When I use it without argument (filepath) and use file path hard coded inside the lisp - it works good. But I need it with parameter, and don't know, how to make it. I get an error every time
This is my lisp:
(vl-load-com)
(defun c:Civil_Import(FilePath)
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the import
(setq insertPoint (vlax-3d-point 0 0 0))
(setq importFile FilePath ;; Adjust path for your system
scalefactor 1)
;; Import the file
(vla-Import doc importFile insertPoint scalefactor)
;; (vla-ZoomAll acadObj)
(vla-Delete sset)
)
I try to call it from commandline Civil_Import "C:\\ProgramData\\Temp\\test.Dxf"
and get error "Civil_Import ; error: too few arguments"
Help me, please, to fix the file.
Solved! Go to Solution.