.*** ERROR : too many arguments
So I put (arxload "c:/program files/ACAD2000/geomcal.arx") in the
acad2000.lsp
file to be sure it was loaded.
Now everytime I open another drawing I see "arxload failed" (because its
already
loaded). Can someone tell me the proper way to handle this?
Thanks
Randy
Personally, I would not rely upon the command line calculator. LISP is rich
with calculations within itself that should be sufficient for what you are
trying to do.
--
Eugene N. Kilmer
Owner/Mag Drafting
(arxload "c:/program files/ACAD2000/geomcal.arx" 1)
More proper would be checking, if c:cal is already loaded:
(if (/= (type c:cal) 'EXRXSUBR)
(progn
(setq res (arxload "c:/program files/ACAD2000/geomcal.arx" 1))
(if (= res 1)
(prompt "\nCouldn't load calculator arx")
)
)
)
--
Alex Januszkiewicz
Intelcad Systems and 911 DWG Recovery Services
<http://www.intelcad.com>
*Check out our DWF => DWG converter*
** New free ObjectARX downloads coming soon**
--
Smeghead <shie...@sgi.net> wrote in message
news:7v5dhd$e3...@adesknews2.autodesk.com...
I have nothing to contribute to the issue you raise, other than the fun of
saying "Hi Smeghead" which is your chosen newsgroup name, but which is
generally thought of as a rude insult, at least in the UK, and perhaps in
the USA, where we watch Red Dwarf and other British comedies rich in "smeg"
connotations.
Mark McDonough
mmcdo...@sasaki.com
Smeghead wrote in message <7v5dhd$e3...@adesknews2.autodesk.com>...
;;;;;; Loading "geomcal.arx" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun Load_cal ( / file_dia)
(if (not cal)
(progn
(setq file_dia (getvar "filedia"))
(setvar "filedia" 0)
(if (not (findfile "geomcal.arx"))
(prompt "\n Not found 'geomcal.arx' and '_cal command will be not to
work.")
(progn
;(command "appload" "C:\Program Files\ACAD2000\SUPPORT\geomcal.arx")
(command "_arx" "Load" "geomcal.arx")
(setvar "filedia" file_dia)
) ) ) )
(princ)
)
;;;;;; _offset+'cal ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun C:offcal ( / Distanc)
(Load_cal)
(command "_offset")
(setq Distanc (cal))
(command Distanc)
(princ)
)
Smeghead 이(가) <7v5dhd$e3...@adesknews2.autodesk.com> 메시지에서
작성하였습니다...
You don't need to use the Geometry Calculator for such a simple AutoLISP
Calc:
(setq p3 (polar p1 (angle p1 p2) (/ (distance p1 p2) 2)))
OR:
(setq p3 (MapCar '(Lambda (x1 x2) (/ (+ x1 x2) 2)) p1 p2))
--
Phillip Kenewell
CAD Systems Technician
Air Gage Company
pken...@airgage.com
===================
> Not < a Member of the AutoDESK
Discussion Forum Moderator Program
Smeghead <shie...@sgi.net> wrote in message
news:7v5dhd$e3...@adesknews2.autodesk.com...
(if (not (member "geomcal.arx" (arx)))
(arxload "c:/program files/ACAD2000/geomcal.arx" "Couldn't load calculator
arx")
)
Alex Januszkiewicz wrote in message
<7v5hp3$e4...@adesknews2.autodesk.com>...
>There are many ways to avoid this crash. The quick and dirty woul be:
>
> (arxload "c:/program files/ACAD2000/geomcal.arx" 1)
>
>More proper would be checking, if c:cal is already loaded:
>
>(if (/= (type c:cal) 'EXRXSUBR)
> (progn
> (setq res (arxload "c:/program files/ACAD2000/geomcal.arx" 1))
> (if (= res 1)
> (prompt "\nCouldn't load calculator arx")
> )
> )
>)
>
>--
> Alex Januszkiewicz
>Intelcad Systems and 911 DWG Recovery Services
> <http://www.intelcad.com>
> *Check out our DWF => DWG converter*
>** New free ObjectARX downloads coming soon**
>
>
>
>--
>
randy benson (in arabic, randy son-of-a-son).
Randy
I would say, it's rather a matter of preference then efficiency, as you
would need to load 10000 files to catch measurable difference (say 1 sec?)
I usually concentrate my efforts in areas, where significant improvements
can be achieved by proper coding (iterations would be one of them). I can
make my first shot a bit tighter:
(if (/= (type c:cal) 'EXRXSUBR)
(if (= 1 (arxload "c:/program files/ACAD2000/geomcal.arx" 1))
(prompt "\nCouldn't load calculator arx")
)
)
I admit: I'm careless about efficiency of these particular code fragments,
as long as they properly load the program and trap possible error.
--
Alex Januszkiewicz
Intelcad Systems and 911 DWG Recovery Services
<http://www.intelcad.com>
*Check out our DWF => DWG converter*
** New free ObjectARX downloads coming soon**
--
Mark E. Fretty <ma...@aerosys.net> wrote in message
news:7v7bqs$j0...@adesknews2.autodesk.com...