help with setview...

Devin

Usenet Archive
Joined
Sep 27, 2001
Messages
342
Reaction score
0
I'm trying to set a view active in a pviewport, my syntax is:

(vla-setview <pviewport-object> <view-object>)

But I keep getting the error:

ActiveX Server returned the error: unknown name: SetView

Any ideas?

Devin
 
Hi Luis (note: I don't speak Spanish, but perhaps I should as I live in San Diego)

I still can't get it to work. I pass a pviewport object and a view object and I still get an error. Do you know what I am doing wrong?

Devin
 
:-) I am in San Diego too (downtown)

Small world!

;pspace = paperspace object
;views = views collection
;name = view name string
;note that it all works till I get to vla-setview then it crashes

(setq
viewport (vla-addPViewport pspace (vlax-3d-point (list 4.08196 5.44773
0.0)) 8.035845 7.866784)
view (vla-item views name)
)
(vla-setview viewport view)
 
if i use my functions works

i.e.
(set-viewname "TEST")

try by setting the viewport to active with: vla-put-activepviewport
 
Thanks for your help Luis. I must be missing something. I'm still getting an error just trying to set the activePViewport...

Command: !curdoc
#<VLA-OBJECT IAcadDocument 00fc74f0>;the doc is active

Command: (setq obj (vlax-ename->vla-object (car (entsel))))

Select object: #<VLA-OBJECT IAcadPViewport 0732f494>

Command: (vla-put-activepviewport curdoc obj)
Automation Error. Error setting current viewport

Devin
 
Maybe you two guys should meet for lunch (with laptops in hand). :)
Bob
 
(setq obj (vlax-ename->vla-object (car (entsel))))
(vla-put-MSpace curdoc :vlax-true)
(vla-put-activepviewport curdoc obj)

hth
mark
 
There you go...

Bob,

I have a bad habit of always trying to give to others what I think I know, in this case vlisp source code or legacy lisp, etc. If you want, you can join us - I will be at 12th and C downtown SD, at noon the next February 30th. 2004 :-)

Since now that habit has become an addiction, I have plans to quit and tomorrow is my last day.

Regards,
Luis.
 
Devin,

I think you have my email address, if you need any other assistance please send me an email.

BTW, I have tried your sample and in my computer works.

Remember that views are saved in their own location, notice my function:
view-set-location

Hope it makes any sense

Luis.
 
I have to get some work done, but I'm going to figure this out! I'll examine your code a little closer, I'm sure it's something simple that I'm missing.

Thanks,

Devin
 

Latest threads

Back
Top