vla-put-plotrotation not working

vla-put-plotrotation not working

andkal
Collaborator Collaborator
381 Views
4 Replies
Message 1 of 5

vla-put-plotrotation not working

andkal
Collaborator
Collaborator

Hello
Im having a problem with the   vla-put-plotrotation   function. The code changes the "PlotRotation" property succesfully but the paper oritentation doesn't change in the screen. Deos any body know the reason? Regeneratng the view doesn't help.

 

 

 

(setq layout_ename (cdr(assoc -1 (dictsearch(cdr(assoc -1(dictsearch(namedobjdict)"ACAD_LAYOUT"))) (getvar "ctab")))))
(vla-put-plotrotation (vlax-ename->vla-object layout_ename) 0) ; SETS PLOT ROTATION:  0 - horisontal,  1-vertical

 

 

 

 bOuuMGSPcj.jpg


• www.autolisps.blogspot.com - Productivity plugins for Autocad and Autocad MEP
• Autodesk AppStore
0 Likes
Accepted solutions (1)
382 Views
4 Replies
Replies (4)
Message 2 of 5

Moshe-A
Mentor
Mentor

@andkal hi,

 

maybe a regen is missing after?

 

Moshe

 

0 Likes
Message 3 of 5

andkal
Collaborator
Collaborator

Hi
vla-regen doesnt help, redraw doesnt help and  vla-refreshplotdeviceinfo doesnt'help.
Although the property is changed correctly, I don't see the change in the Page Setup Manager too.


• www.autolisps.blogspot.com - Productivity plugins for Autocad and Autocad MEP
• Autodesk AppStore
0 Likes
Message 4 of 5

paullimapa
Mentor
Mentor
Accepted solution

Portrait:

 

(vla-put-PlotRotation (vlax-ename->vla-object layout_ename) ac0degrees)(command"_.Regen")

 

Landscape:

 

(vla-put-PlotRotation (vlax-ename->vla-object layout_ename) ac90degrees)(command"_.Regen")

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 5

andkal
Collaborator
Collaborator

Thanks pauli, your code works.
Actually it was not he case of command"_.Regen" or vla - regen  nor  ac0degrees or 1 or 0.
My code just didnt show the results becouse i changed the vertical (in its dimmensions) paper to already vertical paper.
I wrongly understood that the paper size is defined as "portrait" or "landscape" whereas it is just "not rotated" by default.
So I noticed that the Plotrotation property set to 1 means rotated, and 0 -not rotated.

 


• www.autolisps.blogspot.com - Productivity plugins for Autocad and Autocad MEP
• Autodesk AppStore
0 Likes