SetPlotorigin not working

SetPlotorigin not working

GeeHaa
Collaborator Collaborator
1,704 Views
6 Replies
Message 1 of 7

SetPlotorigin not working

GeeHaa
Collaborator
Collaborator
acPlSetVdr.SetPlotRotation(acPlSet, orient) Dim xyoff As Point2d = New Point2d(Convert.ToDouble(Xoff), Convert.ToDouble(Yoff)) If Xoff = "0.0" And Yoff = "0.0" Then '' Center the plot acPlSetVdr.SetPlotCentered(acPlSet, True) Else acPlSetVdr.SetPlotCentered(acPlSet, False) acPlSetVdr.SetPlotOrigin(acPlSet, xyoff) 'MsgBox(acPlSet.PlotOrigin.ToString) End If

 

Hi,

 

Can anyone tell me why the plot origin does not move. It is staying centered even though I set it to 0,3

I'm using a transaction. The msgBox come up with (0,3). Plot rotation works.

 

Thanks in Advance

 

0 Likes
1,705 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Try doing the 

acPlSetVdr.SetPlotOrigin

statement without an IF statement. See what that does. 

 

Good luck!

 

0 Likes
Message 3 of 7

GeeHaa
Collaborator
Collaborator

Thanks

 

When I step through the code it executes the statements following the else condition. But I tried moving it out- Still does not change the origin. I also checked for a rouge setplotcentered statement. But find did not find anything with the word centered in it other than the if statement.

0 Likes
Message 4 of 7

Anonymous
Not applicable

my guess is

 

1. copy the new, validated settings back to the layout;

2. check any collision of settings that directly affect the plot origin, in particular plot area and plot type.

 

felix

0 Likes
Message 5 of 7

GeeHaa
Collaborator
Collaborator

The only thing I am setting is the plot type ->Autodesk.AutoCAD.DatabaseServices.PlotType.Extents

My thinking is if changing the origin pushes part of the plot off the page it should automatically just clip it.

 

Thanks

0 Likes
Message 6 of 7

Anonymous
Not applicable

well, that could be it, precisley: plottype.extents is said to print everything within the boundaries of the current space. in turn this could determine the plotorigin. if that holds true, you might have just answered it

0 Likes
Message 7 of 7

GeeHaa
Collaborator
Collaborator

I figured it out. I just remembered the offset is in millimeters so with (0,3) I couldn't tell it moved. I multiplied by 25.4 It works.

 

Thanks for all your help.

0 Likes