vlax with 2002 and r14

Clive

Usenet Archive
Joined
Apr 28, 2001
Messages
9
Reaction score
0
I have made a program as below
(defun c:HE
(Graphscr)
(Setq osnp (Getvar "osmode"))
(Setq clay (Getvar "clayer"))
(cOMMAND "-layer" "m" "HEDGE" "c" "GREEN" "" "")

(setq obj (vlax-ename->vla-object (car (entsel "\npick a spline: ")))) (setq startParam (vlax-curve-getStartParam obj)) (sETQ STARTFIRSTPOINT (vlax-curve-getPointAtDist OBJ 0)) (setq endParam (vlax-curve-getEndParam obj)) (sETQ ENDFIRSTPOINT (vlax-curve-getPointAtDist OBJ endParam))
(SETQ IND 2)

(SETQ
DISTTOTAL (vlax-curve-getDistAtParam OBJ (- endPARAM startPARAM)) ) (sETQ NOOFINS (- (/ DISTTOTAL 2) 1)) (SETQ NOOFTEXT (FIX NOOFINS)) (sETQ FIRSTPOINT (vlax-curve-getPointAtDist OBJ IND)) (Command "-layer" "thaw" "HEDGE" "") (Command "-Layer" "s" "HEDGE" "") (SETVAR "OSMODE" 0) (Command "insert" "HE" STARTFIRSTPOINT "2" "1" FIRSTPOINT)

(rEPEAT NOOFTEXT
(sETQ IND (+ IND 2))

(sETQ NEXTPOINT (vlax-curve-getPointAtDist OBJ IND))

(Command "insert" "HE" FIRSTPOINT "2" "1" NEXTPOINT)
(sETQ FIRSTPOINT NEXTPOINT)

)
(Command "insert" "HE" FIRSTPOINT "2" "1" ENDFIRSTPOINT)

(setvar "osmode" osnp)
(Command "-Layer" "s" CLAY "")
(Princ startParam)
(Princ)
)

The program works in 2004 but will not work in 2002 and R14 the nlock is made in all versions

I says something in 2002 about initilising the VLAX commands

Any help would be greatfully accepted.

Regards

Clive
 
Clive said:
I says something in 2002 about initilising the VLAX commands

In 2002 and 2000, you should execute (vl-load-com) prior to calling any vl or vlax functions.
 
Frank,

Meaning you don't have to (vl-load-com) under A2k4?

Joe Burke
 
Luis said:
I am still reading the note VLISP extension: Requires vl-load-com

I've got an A2K4 install that I haven't customized. All vl and vlax functions work straight out of the gate. Perhaps they added (vl-load-com) to one of the startup files.

I'll let you know as soon as I can find the damn things.
<grumble, grumble, grumble>
 

Latest threads

Back
Top