Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

(vla-Put-CenterPlot ALAY 1) does NOT reset origins

62 views
Skip to first unread message

Dieter Sackmann

unread,
Jul 25, 2002, 12:58:37 PM7/25/02
to
Good Day to all ...

With the extreme help from R. Robert Bell yesterday, I have made fantastic
headway on my custom AutoPLOT command.

All is working fantastic... with the following exception:

When setting (vla-Put-CenterPlot ALAY 1), the drawing IS set to plot
centered... However, the X: and Y: Plot Origin values are not reset.
If I go into PAGESETUP from AutoCAD's command line and reselect the Plot
Sheet the X: and Y: Plot Origin values automatically update.


My question of the day:

Should the X: and Y: Plot Origin values update automatically when I issue
the (vla-Put-CenterPlot ALAY 1), or MUST I set the Plot Origin value myself
????

Any assistance in this matter (as always ) will be greatly appreciated.

___________________________________________________________
Dieter Sackmann
NETWORK MANAGER / CADD TECH.

LM ARCHITECTURAL GROUP
300 - 290 Vaughan Street
Winnipeg, Manitoba
Canada R3B 2L9

www.lm-architects.com
Tel: 204.942.0681
Fax: 204.943.8676


R. Robert Bell

unread,
Jul 25, 2002, 1:49:23 PM7/25/02
to
Have you issued a RefreshPlotDevice before attempting to set the CenterPlot?

--
R. Robert Bell, MCSE
www.AcadX.com


"Dieter Sackmann" <dsac...@lm-architects.com> wrote in message
news:A7E920B8D325466B...@in.WebX.maYIadrTaRb...

Dieter Sackmann

unread,
Jul 25, 2002, 2:00:47 PM7/25/02
to
Hello Robert,

Yes I have... Below is the sequence in which I issue my vla- commands:

(vla-RefreshPlotDeviceInfo ALAY)
(vla-Put-Configname ALAY OUTPUT);; #pc3filename#)
(setq canon_name (vlax-safearray->list (vlax-variant-value
(vla-GetCanonicalMediaNames ALAY)))
paper_size (mapcar '(lambda (x) (vla-GetLocaleMediaName ALAY
x)) canon_name)
)
(setq #ctbfilename#
(if (cdr(assoc "CTB" (cadr CUR_SET)))
(nth (atoi(cdr(assoc "CTB" (cadr CUR_SET)))) V:CTBL)
"LMAG.ctb"
)
)
(vla-Put-StyleSheet ALAY #ctbfilename#)
(vla-Put-PlotRotation ALAY V:OR)
(setq #papersize# (nth (- (length paper_size)(length(member #papersize#
paper_size))) canon_name))
(vla-Put-PaperUnits ALAY (if (ISMTRC) acMillimeters acInches));;
0=inches 1=millimeters
(vla-Put-CanonicalMediaName ALAY #papersize#)
(vla-Put-PlotHidden ALAY 0)
(vla-Put-PlotViewportBorders ALAY 0)
(vla-Put-PlotViewportsFirst ALAY 1)
(vla-Put-PlotWithPlotStyles ALAY 1)
(vla-Put-PlotWithLineweights ALAY 1)
(vla-Put-ScaleLineweights ALAY 0)
(vla-Put-ShowPlotStyles ALAY 1)
(vla-SetWindowToPlot ALAY p1 p2)
(vla-Put-PlotType ALAY acWindow)
(vla-Put-CenterPlot ALAY 1)
, , ,


"R. Robert Bell" <NOT.r...@acadx.com> wrote in message
news:4F6785F8665855EB...@in.WebX.maYIadrTaRb...

Dieter Sackmann

unread,
Jul 25, 2002, 2:20:37 PM7/25/02
to
I have tried it both ways to no avail... I even tried placing a call to the
RefreshPlotDeviceInfo before and after the call to the ConfigName property,
still nothing... according to the ActiveX and VBA Reference it states:

"Use the RefreshPlotDeviceInfo method before trying to change the ConfigName
property."

Very odd... Any other thoughts ??? Anyone...


"R. Robert Bell" <NOT.r...@acadx.com> wrote in message

news:7D06FC2BB28AC20B...@in.WebX.maYIadrTaRb...
> Shouldn't the refresh come *after* loading the pc3?

R. Robert Bell

unread,
Jul 25, 2002, 2:09:23 PM7/25/02
to
Shouldn't the refresh come *after* loading the pc3?

--


R. Robert Bell, MCSE
www.AcadX.com


"Dieter Sackmann" <dsac...@lm-architects.com> wrote in message

news:E6FAD99CA843F9BE...@in.WebX.maYIadrTaRb...

Dieter Sackmann

unread,
Jul 25, 2002, 5:33:32 PM7/25/02
to
Some further insight and puzzling questions to a seemingly simple solution
???

>> When setting (vla-Put-CenterPlot ALAY 1), the drawing IS set to
>> plot centered... However, the X: and Y: Plot Origin values are not
>> reset. If I go into PAGESETUP from AutoCAD's command line

>> and reselect the Plot. Sheet the X: and Y: Plot Origin values
>> automatically update.
>>


>> Should the X: and Y: Plot Origin values update automatically when
>> I issue the (vla-Put-CenterPlot ALAY 1), or MUST I set the Plot
>> Origin value myself ?

Going on the assumption that I would need to set the Plot Origin Values
myself, I proceeded to extract the PaperMargins with the following vla-
method:

(vla-GetPaperMargins ALAY 'LL 'UR)

to which AutoCAD happily returns #<safearray...> (two-element array of
doubles) for both LL and UR... I then continue by issuing the following
vlax: function to convert LL and UR to lists

(vlax-safearray->list LL) and (vlax-safearray->list UR)

BUT ALAS.... I'M CORNERED AGAIN... Both return lists of (0.0 0.0)

Am I doing something wrong ???

Please, any assistance will be greatly appreciated.


0 new messages