StyleSheet Property!

StyleSheet Property!

Anonymous
Not applicable
201 Views
3 Replies
Message 1 of 4

StyleSheet Property!

Anonymous
Not applicable
Hi,

Does anyone know if it's possible to specify Plot Style Tables located in a
different folder than the standard PlotStyle folder?

Have any experimented with this?

Regards,

Morten Andersen
0 Likes
202 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I haven't tried that specifically. However, I initially thought you were supposed to
provide a fully qualified path name to the stylesheet property. When I tried to do this
it made my program crash.

Chuck


"Morten Andersen" wrote in message
news:260B92C8BE8B13F8521804BC951DEFD5@in.WebX.maYIadrTaRb...
> Hi,
>
> Does anyone know if it's possible to specify Plot Style Tables located in a
> different folder than the standard PlotStyle folder?
>
> Have any experimented with this?
>
> Regards,
>
> Morten Andersen
>
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
Ok, let me tell you the exact problem.

I did this Plot Routine, which has been workin fine for the last 3 months.
By fine I mean that I had no problem i providing af full path to the
StyleSheet property. Then to day I wanted to make af few changes to the
routine, and suddenly the property will not accept a fullpath.

I realize that the help file doesn't say anything about a full path, but
since the routine has been workin fine so far, I'm in a situation where I
must choose whether or not to go with the full path or not. It's rather
critical to the routine, as it lets the user choose to save Plot Styles in
the same folder as the drawing, and then later retrieve it again. All this
without the ctb file having to reside in the Plot Style folder of Acad.

Any input from Autodesk, will be greatly appreciated.

/Morten Andersen
"Chuck Gabriel" wrote in message
news:56F801FCED8464EB1A494AD1827E48DE@in.WebX.maYIadrTaRb...
> I haven't tried that specifically. However, I initially thought you were
supposed to
> provide a fully qualified path name to the stylesheet property. When I
tried to do this
> it made my program crash.
>
> Chuck
>
>
> "Morten Andersen" wrote in message
> news:260B92C8BE8B13F8521804BC951DEFD5@in.WebX.maYIadrTaRb...
> > Hi,
> >
> > Does anyone know if it's possible to specify Plot Style Tables located
in a
> > different folder than the standard PlotStyle folder?
> >
> > Have any experimented with this?
> >
> > Regards,
> >
> > Morten Andersen
> >
> >
>
>
0 Likes
Message 4 of 4

Anonymous
Not applicable
Again, he who looks shall find answers.

Looking through my code, I found the answer, and let me just say that the
StyleSheet property is able to recieve a full path.

Here is a function I use to initialize plots:

Public Function InitPlot(hgPlotter As String, hgRotation As Integer,
hgPlotStyle As String, hgPlotPaper As String, Optional hgDenominator As
Double, Optional hgScaleToFit As Boolean) As String

Dim Numerator As Double

On Error GoTo Error:

InitPlot = ""

Numerator = 1

hgPlotter = hgPlotter & ".pc3"

If hgPlotCon.ConfigName = hgPlotter Then

Else
hgPlotCon.ConfigName = hgPlotter
End If

If hgPlotCon.CanonicalMediaName = hgPlotPaper Then
Else
hgPlotCon.CanonicalMediaName = hgPlotPaper
End If

If hgPlotCon.PaperUnits = acMillimeters Then
Else
hgPlotCon.PaperUnits = acMillimeters
End If

hgPlotCon.PlotRotation = hgRotation
hgPlotCon.StyleSheet = hgPlotStyle
hgPlotCon.SetWindowToPlot Point1, Point2
hgPlotCon.PlotType = acWindow

If hgScaleToFit = False Then
hgPlotCon.UseStandardScale = False
hgPlotCon.SetCustomScale Numerator, hgDenominator
ElseIf hgScaleToFit = True Then
hgPlotCon.UseStandardScale = True
hgPlotCon.StandardScale = acScaleToFit
End If

Exit Function

Error:

InitPlot = Err.Description

End Function

As it turned out, I had for some reason forgot an extra L in acMillimeters.
And strangely enough this caused StyleSheet to fail when given a full path.
Odd!!! But my problem is solved.

Chears.

Morten Andersen

"Morten Andersen" wrote in message
news:260B92C8BE8B13F8521804BC951DEFD5@in.WebX.maYIadrTaRb...
> Hi,
>
> Does anyone know if it's possible to specify Plot Style Tables located in
a
> different folder than the standard PlotStyle folder?
>
> Have any experimented with this?
>
> Regards,
>
> Morten Andersen
>
>
0 Likes