regen all open documents

FloriB

Usenet Archive
Joined
Jul 31, 2003
Messages
3
Reaction score
0
want to regen all open documents. therefor i use vlisp to create a list containing all open documents as objects.

the list can look something like this:
(#<VLA-OBJECT IAcadDocument 0112392c> #<VLA-OBJECT IAcadDocument 01103f8c> #<VLA-OBJECT IAcadDocument 01130abc>)

to regen all those documents i use this code:

(setq iLength (length lListOfDocuments) iCount 0)
(command "_regen" "")
(repeat iLength
(vla-put-activedocument (vlax-get-acad-object) (nth iCount lListOfDocuments)) (command "_regen" "") (setq iCount (1+ iCount))
)

but it won't work. :(
does someone have a solution for this problem?
 
soory for the bad structure of the text.
this one ist with <br>'s:

want to regen all open documents.
therefor i use vlisp to create a list containing all open documents as objects.

the list can look something like this:
(#<VLA-OBJECT IAcadDocument 0112392c> #<VLA-OBJECT IAcadDocument 01103f8c> #<VLA-OBJECT IAcadDocument 01130abc>)

to regen all those documents i use this code:

(setq iLength (length lListOfDocuments) iCount 0)
(command "_regen" "")
(repeat iLength
 (vla-put-activedocument (vlax-get-acad-object) (nth iCount lListOfDocuments))  (command "_regen" "")  (setq iCount (1+ iCount))
)

but it won't work. :(
does someone have a solution for this problem?
 
(setq iLength (length lListOfDocuments) iCount 0)
(command "_regen" "")
(repeat iLength
(vla-put-activedocument (vlax-get-acad-object) (nth iCount lListOfDocuments)) (command "_regen" "") (setq iCount (1+ iCount))
)

but it won't work. :(
does someone have a solution for this problem?

I know very little about VL commands, but I'm pretty sure you can't have a variable start with a number (1ListOfDocuments). Also, you don't need the first (command "_regen"). the NTH command starts at the first one (#0, in fact), and will scroll thru the lot of them. I believe (someone tell me if I'm wrong) you need to access the acad-object before starting the REPEAT loop.
Anybody else ?

Dr Fleau
 

Latest threads

Back
Top