Author Topic: (LISP) progecad , attout  (Read 1067 times)

0 Members and 1 Guest are viewing this topic.

mejra

  • Mosquito
  • Posts: 2
(LISP) progecad , attout
« on: November 01, 2021, 05:08:22 PM »
Hi,

I'm working on tool that export attributes from progecad to spreadhseet. My plan was to do it by VBA, but the command .getAttribute is much slower than the express tool attout. I would like to create a lisp routine that would call the attout and exported text file, iI found this code which work in AUTOCAD, but not in progecad. Can anyone help me convert it to intellicad lisp please? And also, Is there any good literature where I could learn basics of the intellicad lisp?

Thank you.

The error say:
error: LOAD failed
Command: _APPLOAD


Code: [Select]
(defun c:out-att ()
(load "attout")
(setq fna (strcat (getvar "dwgprefix")
(acet-filename-path-remove (acet-filename-ext-remove (getvar "dwgname")))
".txt"
))
(setq ss (ssget "X" '((0 . "INSERT") (66 . 1))))
(bns_attout fna ss)
)

BIGAL

  • Swamp Rat
  • Posts: 1411
  • 40 + years of using Autocad
Re: (LISP) progecad , attout
« Reply #1 on: November 01, 2021, 08:54:51 PM »
Multiple questions,

1 Did you put attout.lsp in a directory that is in a search path for Progecad ?

2 Is acet functions supported in Intellicad, if not will need to rework the code and replace with plain style lisp.

3 (acet-autoload '("yes_no.lsp" "(bns_get_yes_no a b)")) do you have yes no.lisp see 2.

4 Could write your own ?
A man who never made a mistake never made anything

mejra

  • Mosquito
  • Posts: 2
Re: (LISP) progecad , attout
« Reply #2 on: November 05, 2021, 10:56:22 AM »
Thanks for quick answer,

Yes, the lisp is loaded, i can call that command, but it shows error.

I simplified the function and avoided the acet, anyway it still doesn't work.

Can't open "attout.lsp" for input
error: LOAD failed

Code: [Select]
(defun c:Att-out2 ()
(load "attout")
(setq fna "C:\\att.txt")
(setq ss (ssget "X" '((0 . "INSERT") (66 . 1))))
(bns_attout fna ss))

BIGAL

  • Swamp Rat
  • Posts: 1411
  • 40 + years of using Autocad
Re: (LISP) progecad , attout
« Reply #3 on: November 05, 2021, 11:38:04 PM »
There is just so many examples of the same as Attout via lisp, do a google, for me generally write a custom export to suit the situation.  Either to csv or more recent direct to excel.
A man who never made a mistake never made anything