Author Topic: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT  (Read 13794 times)

0 Members and 1 Guest are viewing this topic.

hyposmurf

  • Guest
Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« on: May 24, 2007, 05:53:14 AM »
Hello everyone,been a while since my head has surfaced on here.Been meaning to sign on but find I have very little spare time and the spare time.
Anyway on to my post.I have CAD2K8 installed on my PC now upgraded through subscription.As all installations I have found there are bugs/problems.Never had a clean trouble free install.One of the problems I have is that my autoload files do not autoload if I go to type the command I get this error:
VLAX-ENAME-VLA-OBJECT
The lisp does then not work.This is a intermittant fault, I have done three complete re-installs now.I have also found that if I manually load this lisp I get the same error.This is annoying in that I cant use certain everyday lisps, plus my autolog lisp for my timesheet aint working.Any ideas?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #1 on: May 24, 2007, 06:02:40 AM »
What error ??

added:
and did you mean (VLAX-ENAME->VLA-OBJECT) ?

and do you have (vl-load-com) called from somewhere in your startup routines ?
« Last Edit: May 24, 2007, 06:08:06 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

hyposmurf

  • Guest
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #2 on: May 24, 2007, 07:30:23 AM »
Code: [Select]
;;  The following are the command line pre set rotate routines
(defun c:90()
  (rotatess 90)
  (princ)
)
(defun c:fl()
  (rotatess 180)
  (princ)
)
(defun c:-90()
  (rotatess 270)
  (princ)
)

(defun c:270()
  (rotatess 270)
  (princ)
)

;; the following works line this
;;  you enter rss <space key> <number> <enter>
(defun c:rss(/ ang)
      (while
        (progn
          (setq ang
                 (cond ((getint "\nEnter the rotation angle [90/180/270] <90>"))
                       (90)))
          (if (not (vl-position ang '(90 180 270 -90)))
            (not (prompt "\nError  Angle must be 90 180 270, please re-enter.")))
        )
      )
  (rotatess ang)
  (princ)
)



;;  By CAB 10/18/06
;;  Rotate a ss at center of ss by angle argument
(defun rotatess ( rang / ss ll-ur cenpt rang)
  ;;  This is my variation of a routine by Joe Burke
  ;;  returns a point list ((lower left)(upper right))
  (defun ssboundingbox (ss / i ent lst ptlst mnpt mxpt)
    (setq i -1)
    (while (setq ent (ssname ss (setq i (1+ i))))
      (setq lst (cons (vlax-ename->vla-object ent) lst))
    )
    (mapcar '(lambda (x)
               (vla-getboundingbox x 'mnpt 'mxpt)
               (setq ptlst (cons (vlax-safearray->list mnpt) ptlst))
               (setq ptlst (cons (vlax-safearray->list mxpt) ptlst))
             )
            lst
    )
     ;following by Tony Tanzillo
    (list
      (apply 'mapcar (cons 'min ptlst))
      (apply 'mapcar (cons 'max ptlst))
    )
  )

  ;;  Start here
  (prompt (strcat  "\nSelect objects to rotate " (itoa rang) " deg."))
  (if (setq ss (ssget))
    (progn
      (setq ll-ur (ssboundingbox ss))
      (setq cenpt (polar (car ll-ur)
                         (angle (car ll-ur) (cadr ll-ur))
                         (/ (distance (car ll-ur) (cadr ll-ur)) 2)))
      ;;(command "_.rotate" ss "" "_non" cenpt rang)
      ;;  Vla-rotate
      (setq rang  (/ (* rang pi) 180.0)) ; deg to rad
      (setq cenpt (vlax-3D-point cenpt))
      (setq i -1)
      (while (setq ent (ssname ss (setq i (1+ i))))
        (vla-rotate (vlax-ename->vla-object ent) cenpt rang)
      )

    )
  )
  (princ)
)
[/color]

Using the above routine to flip an object I get :
Command: fl

Initializing...
Select objects to rotate 180 deg.
Select objects: Specify opposite corner: 1 found

Select objects:
no function definition: VLAX-ENAME->VLA-OBJECT
Command:


This is what is in my auto load lisp:

Code: [Select]
[color=green](AUTOLOAD "rotset" '("fl")) ;  rotate 180[/color]

Fatty

  • Guest
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #3 on: May 24, 2007, 08:05:12 AM »
As that said to you Kerry just
add vl-load-com function:

Code: [Select]
(defun c:rss(/ ang)
[color=red](vl-load-com)[/color]
      (while
        (progn
          (setq ang
                 (cond ((getint "\nEnter the rotation angle [90/180/270] <90>"))
                       (90)))
          (if (not (vl-position ang '(90 180 270 -90)))
            (not (prompt "\nError  Angle must be 90 180 270, please re-enter.")))
        )
      )
  (rotatess ang)
  (princ)
)




hyposmurf

  • Guest
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #4 on: May 24, 2007, 08:19:49 AM »
Thats not had any effect. :-(

hyposmurf

  • Guest
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #5 on: May 24, 2007, 08:59:14 AM »
Just used my lisp to insert a rev box.Simple routine should work but it doesnt seem to insert the block, it just throws my titleblock off to the right side of my drawing in paper space.
Code: [Select]
(defun c:P1 ()
(command "-insert" "revP1" pause "" "" "")(command)
(command ".regen")
(princ)
)

If I go insert that block into my drawing afterwards it appears that CAD has the block available to within the drawing to insert manually?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #6 on: May 24, 2007, 09:12:46 AM »
Place the code here:
Change this
Code: [Select]
;;  Start here

to this:
Code: [Select]
;;  Start here
(vl-load-com)


PS I apologize for not including it in the first place.
« Last Edit: May 24, 2007, 09:14:29 AM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

hyposmurf

  • Guest
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #7 on: May 24, 2007, 10:01:00 AM »
Thanks for that CAB I still have other problems!

Code: [Select]
Enter new value for DIMASZ <3.000>: 3.0000 ; error: no function definition:
VLR-COMMAND-REACTOR
; error: no function definition: VLR-DWG-REACTOR

The lisp that produces this above:

Code: [Select]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (command "dimasz" "3.0000")
  (prin1)
Its just from a number of presets I have when opening drawings.This error is intermittant.Happens when I open CAD from my shortcut and also when I open an existing drawing from a folder

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #8 on: May 24, 2007, 10:09:32 AM »
Put this in your acaddoc.lsp so it will load in every drawing.
(vl-load-com)

Then try again.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

GDF

  • Water Moccasin
  • Posts: 2084
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #9 on: May 24, 2007, 10:56:03 AM »
Put this in your acaddoc.lsp so it will load in every drawing.
(vl-load-com)

Then try again.

This is what I do....to keep from forgetting to include this missing function: (vl-load-com)

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

hyposmurf

  • Guest
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #10 on: May 24, 2007, 11:11:36 AM »
That seems to sort most of my lisps as far as I know.However I still get the really odd problem with the rev block Im inserting.It goes to insert then when I specificy the base point the titleblock shifts together with all the rev blocks and text in paper space.The rev block I tried to insert is not there.Even more oddly if I save the drawing with all the paper space details shifted to the left, I then reopen the drawing and it is back to its original state before I inserted the block via lisp (not shifted to left side).A regen does not effect this.
Thanks for all your help so far.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #11 on: May 24, 2007, 05:14:09 PM »
looks like I was talking to myself again !  :|
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #12 on: May 24, 2007, 05:30:11 PM »
looks like I was talking to myself again !  :|

I hate when that happens.  It makes me not want to respond to those people anymore.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

hyposmurf

  • Guest
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #13 on: May 25, 2007, 05:42:03 PM »
looks like I was talking to myself again !  :|

I hate when that happens.  It makes me not want to respond to those people anymore.

Sorry I was trying to sort the problem while at work,with explorer minimised and carry on getting some projects out.Where Im situated at work makes it very difficult use the net.To be honest at the time I didnt try that (vl-load-com) I was still trying out lots of other remedies before I had noticed CAB mentioned it.Im almost back to normal with the installation.Weird that until 2008 I didnt have this problem with (vl-load-com), maybe (vl-load-com) was included in the 2007 acaddoc.lsp.Im almsot there now with my set up just this weird thing still happening with my block insert lisp.

Anyway thanks Tim and CAB. I do appreciate your time and help   :smack:

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Lisp wont autoload or load VLAX-ENAME-VLA-OBJECT
« Reply #14 on: May 25, 2007, 05:49:13 PM »
Anyway thanks Tim and CAB. I do appreciate your time and help   :smack:
Wasn't me that helped you, it was Kerry in the first response (see below), so if you are to thank someone besides CAB it would be him.  I was just responding to what Kerry said later on in the thread.
What error ??

added:
and did you mean (VLAX-ENAME->VLA-OBJECT) ?

and do you have (vl-load-com) called from somewhere in your startup routines ?

Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.