.NET

Reply
Distinguished Contributor
Posts: 138
Registered: ‎04-14-2005
Message 1 of 7 (212 Views)

SetPlotorigin not working

212 Views, 6 Replies
02-28-2012 12:41 PM
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

 

Distinguished Contributor
VB_Autocad_guy
Posts: 136
Registered: ‎07-24-2009
Message 2 of 7 (203 Views)

Re: SetPlotorigin not working

02-28-2012 01:50 PM in reply to: GeeHaa

Try doing the 

acPlSetVdr.SetPlotOrigin

statement without an IF statement. See what that does. 

 

Good luck!

 

Distinguished Contributor
Posts: 138
Registered: ‎04-14-2005
Message 3 of 7 (200 Views)

Re: SetPlotorigin not working

02-28-2012 02:17 PM in reply to: GeeHaa

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.

Valued Contributor
FFlix
Posts: 95
Registered: ‎11-15-2011
Message 4 of 7 (175 Views)

Re: SetPlotorigin not working

02-29-2012 10:20 AM in reply to: GeeHaa

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

Distinguished Contributor
Posts: 138
Registered: ‎04-14-2005
Message 5 of 7 (170 Views)

Re: SetPlotorigin not working

02-29-2012 10:42 AM in reply to: GeeHaa

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

Valued Contributor
FFlix
Posts: 95
Registered: ‎11-15-2011
Message 6 of 7 (157 Views)

Re: SetPlotorigin not working

03-01-2012 07:04 AM in reply to: GeeHaa

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

Distinguished Contributor
Posts: 138
Registered: ‎04-14-2005
Message 7 of 7 (151 Views)

Re: SetPlotorigin not working

03-01-2012 08:03 AM in reply to: GeeHaa

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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community