2009-01-26

Are you color blind?

AutoCAD has two basic types of printing styles. Color dependent and style dependent. If you are on the original Color based printing and want to convert your current drawing to this style. Try this little ditty.


Public Function ConvertToCtb()
Const sRet As String = """"
Dim sCmd As String
Dim sPstyle As String
'''''''''''''''''''''''''''''''''''''''
sPstyle = ThisDrawing.GetVariable("PSTYLEMODE")

If sPstyle = "0" Then
sCmd = "(command " & sRet & "convertpstyles" & sRet & " " & ")" & vbCr
ThisDrawing.SendCommand sCmd
End If
End Function

2 comments:

Bert Vanpeteghem said...

Hi,

I just started out blogging on the AutoCAD API. I found your blog through the CadTutor Forums.

I was looking around for an easy way to use code formatting. I found out that using Windows Live Writer (free) with a code-formatting plugin works great:

htpp://cupocadnet.blogspot.com

JWalker said...

I use the Visual Studio and AutoCAD's built in editor but another nice free one for coding in text is Notepad++

http://notepad-plus.sourceforge.net/uk/site.htm