Hi there,
I'm developing a function to plot a drawing and I want to be able to select the plot style (CTB) to use.
In order to do so I want to populate a listbox in a userform with the list of all available plotstyles saved in the user pc.
How can I get the list of all plot styles?
thank you.
f
You use AcadPreferenceFiles.PrintStyleSheetPath to find folder location of CTB files, and then use DIR to get each *.CTB file name. Somethin glike:
Dim path As String
path=ThisDrawing.Applications.Preferences.Files.PrintStyleSheetPath
Dim ctbFiles() As String
Dim i As Interger
Dim ctb As String
ctb=Dir(path & "\*.ctb")
Do While ctb<>""
Redim ctbFiles(i)
ctbFiles(i)=ctb
i=i+1
ctb=Dir
Loop
''Now you can use the array of CTB file names to populate listbox/combox in the UserForm
Norman Yuan