automation command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am working with two custom AutoCAD commands: (c:htry) and (c:fabpdf). While both commands function correctly when invoked individually, automating the input for (c:fabpdf) presents a challenge. Specifically, after executing (c:fabpdf), the command prompts for the height of the PDF, and you're unable to programmatically supply this value within your AutoLISP routine.
MY current AutoLISP function is as follows:
(defun c:genretae()
(c:htry)
(setq pdf_height 2400)
(c:fabpdf)
(v1-cmdf "")
(command (itoa pdf_height))
(princ)
)
In this function, after setting pdf_height to 2400, you call (c:fabpdf), which then prompts for the height. The subsequent (command (itoa pdf_height)) is intended to supply this value, but it doesn't work as expected because the prompt within (c:fabpdf) is likely using functions like getint or getreal, which pause execution and wait for user input, and do not accept input from the (command) function.