| Author |
Message |
John Avitt
Guest
|
Posted:
Fri Apr 01, 2005 1:59 am Post subject:
Current PlotConfiguration |
|
|
How can I get the name of the current PlotConfiguration (i.e., the current
Page Setup)?
Thank you.
John
|
|
| Back to top |
|
 |
Ed Jobe
Guest
|
Posted:
Fri Apr 01, 2005 5:29 am Post subject:
Re: Current PlotConfiguration |
|
|
I havn't found that vba exposes that info, its just the current layout's
settings. I use the attached lisp to return it to vba. You can then return
it to vba from lisp with the following code. Note that vlax refers to a
class file that should be available as a download if you search this forum.
Public Function GetCurrentPlotConfig(LayoutName As String)
'Returns the name of the current PlotConfig for the specified layout
'Must do this though lisp because vba does not expose this property.
'
Dim vl As VLAX
Dim strPC As String
Set vl = New VLAX
'make sure lisp function (CurrentPlotConfig) is loaded
vl.EvalLispExpression ("(if (null CurrentPlotConfig)(load
""CurrentPlotConfig.lsp""))")
strPC = "(CurrentPlotConfig """ & LayoutName & """)"
strPC = vl.EvalLispExpression(strPC)
Set vl = Nothing
GetCurrentPlotConfig = strPC
End Function
--
----
Ed
----
"John Avitt" <sorry@nospam.net> wrote in message
news:424c6492$1_3@newsprd01...
| Quote: | How can I get the name of the current PlotConfiguration (i.e., the current
Page Setup)?
Thank you.
John
|
|
|
| Back to top |
|
 |
John Avitt
Guest
|
Posted:
Fri Apr 01, 2005 6:56 pm Post subject:
Re: Current PlotConfiguration |
|
|
Thank you for your reply.
One thing I have tried, unsuccessfully, is to set the USERS1 system variable
from within AutoLISP to the name of the current configuration, then extract
it in VBA with AcadDocument.GetVariable("USERS1"). I can't seem to get it to
work. It always returns an empty string.
Thank you.
John
"Ed Jobe" <not.edljobe@hotmail.com> wrote in message
news:424c959c$1_1@newsprd01...
| Quote: | I havn't found that vba exposes that info, its just the current layout's
settings. I use the attached lisp to return it to vba. You can then return
it to vba from lisp with the following code. Note that vlax refers to a
class file that should be available as a download if you search this
forum.
Public Function GetCurrentPlotConfig(LayoutName As String)
'Returns the name of the current PlotConfig for the specified layout
'Must do this though lisp because vba does not expose this property.
'
Dim vl As VLAX
Dim strPC As String
Set vl = New VLAX
'make sure lisp function (CurrentPlotConfig) is loaded
vl.EvalLispExpression ("(if (null CurrentPlotConfig)(load
""CurrentPlotConfig.lsp""))")
strPC = "(CurrentPlotConfig """ & LayoutName & """)"
strPC = vl.EvalLispExpression(strPC)
Set vl = Nothing
GetCurrentPlotConfig = strPC
End Function
--
----
Ed
----
"John Avitt" <sorry@nospam.net> wrote in message
news:424c6492$1_3@newsprd01...
How can I get the name of the current PlotConfiguration (i.e., the
current
Page Setup)?
Thank you.
John
|
|
|
| Back to top |
|
 |
John Avitt
Guest
|
Posted:
Fri Apr 01, 2005 7:16 pm Post subject:
Re: Current PlotConfiguration |
|
|
I don't know what I was doing wrong, but it is working now. I use the
SendCommand method to run an AutoLISP function that sets the USERS1 system
variable to the current plot configuration name, then I use the GetVariable
method to retrieve its value.
Thank you.
John
"John Avitt" <sorry@nospam.net> wrote in message
news:424d52ca$1_3@newsprd01...
| Quote: | Thank you for your reply.
One thing I have tried, unsuccessfully, is to set the USERS1 system
variable from within AutoLISP to the name of the current configuration,
then extract it in VBA with AcadDocument.GetVariable("USERS1"). I can't
seem to get it to work. It always returns an empty string.
Thank you.
John
"Ed Jobe" <not.edljobe@hotmail.com> wrote in message
news:424c959c$1_1@newsprd01...
I havn't found that vba exposes that info, its just the current layout's
settings. I use the attached lisp to return it to vba. You can then
return
it to vba from lisp with the following code. Note that vlax refers to a
class file that should be available as a download if you search this
forum.
Public Function GetCurrentPlotConfig(LayoutName As String)
'Returns the name of the current PlotConfig for the specified layout
'Must do this though lisp because vba does not expose this property.
'
Dim vl As VLAX
Dim strPC As String
Set vl = New VLAX
'make sure lisp function (CurrentPlotConfig) is loaded
vl.EvalLispExpression ("(if (null CurrentPlotConfig)(load
""CurrentPlotConfig.lsp""))")
strPC = "(CurrentPlotConfig """ & LayoutName & """)"
strPC = vl.EvalLispExpression(strPC)
Set vl = Nothing
GetCurrentPlotConfig = strPC
End Function
--
----
Ed
----
"John Avitt" <sorry@nospam.net> wrote in message
news:424c6492$1_3@newsprd01...
How can I get the name of the current PlotConfiguration (i.e., the
current
Page Setup)?
Thank you.
John
|
|
|
| Back to top |
|
 |
|
|
|
|