Hi Guys,
please I did batch plot using C# I use specific plot style name, but I want to load the plot styles in the storred path on the server into a ListBox.
please see the image attached.
thank you very much
Solved! Go to Solution.
Solved by norman.yuan. Go to Solution.
You can use COM API AcadPreferencesFiles.PrinterStyleSheetPath to get the folder path where *.ctb files are located.
If you use .NET 4, you can use dynamic without having to add reference to AutoCAD COM API interop:
C# code would be like:
dynamic cadPreferences=Application.Preference;
string folder=cadPreferences.PrinterStyleSheetPath;
string[] ctbFiles=System.IO.Directory.GetFiles(folder, "*.ctb");
Then you can use the file name array to populate listbox.
Norman Yuan
Can't find what you're looking for? Ask the community or share your knowledge.