TlsUtility.cls
上传用户:yayuwl
上传日期:2022-03-18
资源大小:8952k
文件大小:30k
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "TlsUtility"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
- Private m_oApp As AcadApplication
- Public Property Let Application(ByVal vNewValue As AcadApplication)
- Set m_oApp = vNewValue
- End Property
- Private Property Get ThisDrawing() As AcadDocument
- Set ThisDrawing = m_oApp.ActiveDocument
- End Property
- Public Function LeftStr(ByVal String1 As Variant, ByVal String2 As Variant)
- On Error Resume Next
- LeftStr = Left(String1, InStr(String1, String2) - 1)
- End Function
- Public Function RightStr(ByVal String1 As Variant, ByVal String2 As Variant)
- On Error Resume Next
- RightStr = Right(String1, Len(String1) - Len(String2) - InStr(String1, String2) + 1)
- End Function
- Public Sub SetCaption(ByVal NewCaption As String)
- SetWindowText m_oApp.hwnd, NewCaption
- End Sub
- Public Function GetEntity() As AcadEntity
- Dim obj As AcadEntity, pnt
-
- ThisDrawing.Utility.GetEntity obj, pnt
- Set GetEntity = obj
-
- End Function
- Public Function GetDistance(ByVal Point1, ByVal Point2)
- GetDistance = Sqr((Point2(0) - Point1(0)) ^ 2 + (Point2(1) - Point1(1)) ^ 2)
-
- End Function
- Public Function OutputPoint(ByVal Point As Variant)
- ThisDrawing.Utility.Prompt vbCrLf & Point(0) & "," & Point(1) & "," & Point(2)
- End Function
- Public Function IsEqual(ByVal Value1 As Double, ByVal Value2 As Double) As Boolean
- IsEqual = Abs(Value1 - Value2) < 10 ^ -8
-
- End Function
- Public Function SetXRecord(ByVal DictName As String, ByVal Keyword As String, ByVal XRecordData)
- Dim pDict As AcadDictionary
- Dim pXRecord As AcadXRecord
- Dim XRecordType() As Integer
- Dim pLen As Integer
-
- Set pDict = ThisDrawing.Dictionaries.Add(DictName)
- Set pXRecord = pDict.AddXRecord(Keyword)
-
- pLen = UBound(XRecordData)
- ReDim XRecordType(pLen) As Integer
- For i = 0 To pLen
- Select Case VarType(XRecordData(i))
- Case vbInteger, vbLong
- XRecordType(i) = 70
- Case vbSingle, vbDouble
- XRecordType(i) = 40
- Case vbString
- XRecordType(i) = 1
- End Select
- Next i
-
- pXRecord.SetXRecordData XRecordType, XRecordData
- End Function
- Public Function GetXRecord(ByVal DictName As String, ByVal Keyword As String)
- Dim pDict As AcadDictionary
- Dim pXRecord As AcadXRecord
- Dim xt
- Set pDict = ThisDrawing.Dictionaries(DictName)
- Set pXRecord = pDict.GetObject(Keyword)
- pXRecord.GetXRecordData xt, GetXRecord
- End Function
- Public Function CreateSelectionSet(Optional ByVal Name As String = "TlsSel") As TlsSelectionSet
- Set CreateSelectionSet = New TlsSelectionSet
- CreateSelectionSet.Application = m_oApp
- CreateSelectionSet.Init Name
- End Function
- Public Function ActiveSelectionSet(Optional ByVal Name As String = "TlsSel") As TlsSelectionSet
- Set ActiveSelectionSet = New TlsSelectionSet
- ActiveSelectionSet.Application = m_oApp
- ActiveSelectionSet.GetActiveSelectionSet
- End Function
- Public Function PickfirstSelectionSet(Optional ByVal Name As String = "TlsSel") As TlsSelectionSet
- Set PickfirstSelectionSet = New TlsSelectionSet
- PickfirstSelectionSet.Application = m_oApp
- PickfirstSelectionSet.GetPickfirstSelectionSet
- End Function
- Public Function CreateArray(ByVal TypeName As VbVarType, ParamArray ValArray())
- Dim nCount As Integer
- Dim i
- Dim mArray
-
- nCount = UBound(ValArray)
-
- Select Case TypeName
- Case vbDouble
- Dim dArray() As Double
- ReDim dArray(nCount)
- For i = 0 To nCount
- dArray(i) = ValArray(i)
- Next i
- CreateArray = dArray
- Case vbInteger
- Dim nArray() As Integer
- ReDim nArray(nCount)
- For i = 0 To nCount
- nArray(i) = ValArray(i)
- Next i
- CreateArray = nArray
- Case vbString
- Dim sArray() As String
- ReDim sArray(nCount)
- For i = 0 To nCount
- sArray(i) = ValArray(i)
- Next i
- CreateArray = sArray
- Case vbVariant
- Dim vArray()
- ReDim vArray(nCount)
- For i = 0 To nCount
- vArray(i) = ValArray(i)
- Next i
- CreateArray = vArray
- Case vbObject
- Dim oArray() As Object
- ReDim oArray(nCount)
- For i = 0 To nCount
- Set oArray(i) = ValArray(i)
- Next i
- CreateArray = oArray
- End Select
- End Function
- Public Function CreatePoint(Optional ByVal X As Double = 0#, Optional ByVal Y As Double = 0#, Optional ByVal Z As Double = 0#)
-
- Dim pnt(2) As Double
- pnt(0) = X: pnt(1) = Y: pnt(2) = Z
-
- CreatePoint = pnt
-
- End Function
- Public Function GetMTextUnformatString(ByVal str As String) As String
- '程序功能:按给定的MText字符串返回可用的字符串
- On Error Resume Next
- Dim pStrs As New Collection
- Dim pStack As Collection
- Dim n As Integer
- Dim pStr As String
- Dim pEnd As String
-
- str = "{" & str & "}"
- Do While Len(str) > 0
-
- n = IIf(Left(str, 1) = "", 2, 1)
- pStr = Left(str, n)
- '分割MText字符串为控制字符或单个字符
-
- If pStr = "}" Then
- '遇"}"时出栈,直到"{"
-
- pEnd = pStrs(pStrs.Count)
- Set pStack = New Collection
- pStack.Add "*TlsCad*"
-
- Do While pEnd <> "{"
-
- pStack.Add pEnd, , 1
- pStrs.Remove pStrs.Count
- pEnd = pStrs(pStrs.Count)
-
- Loop
-
- pStrs.Remove pStrs.Count
- pStack.Remove pStack.Count
-
- For Each i In GetRtfString(pStack)
- '调用GetRtfString函数返回可用的字符集合
-
- pStrs.Add i
-
- Next i
-
- Else
- '当前字符入栈
- pStrs.Add Left(str, n)
-
- End If
-
- str = Right(str, Len(str) - n)
-
- Loop
-
- For Each i In pStrs
- '合并字符集合为字符串
- If Len(i) = 2 Then
- '处理、{、}
- GetMTextUnformatString = GetMTextUnformatString & Right(i, 1)
-
- Else
-
- GetMTextUnformatString = GetMTextUnformatString & i
-
- End If
-
- Next i
-
- End Function
- Private Function GetRtfString(ByVal stack As Collection) As Collection
- '程序功能:按给定的Rtf字符集合返回可用的字符集合
- Dim pStrs As New Collection
- Dim pStr As String, pType As Long
- Dim i, j
-
- For Each i In stack
-
- If Len(i) = 1 Then
-
- pStrs.Add i
-
- ElseIf Len(i) = 2 Then
-
- pType = Asc(UCase(Right(i, 1)))
-
- Select Case pType
-
- Case 85, 92, 123, 125
- ' or { or } or U
-
- pStrs.Add i
-
- Case 65, 67, 70, 72, 81, 84, 87
- 'A or C or F or H or Q or T or W
-
- Do While stack(1) <> ";"
- stack.Remove 1
- Loop
- stack.Remove 1
-
- Case 76, 79, 80
- 'L or O or P
-
- Case 83
- 'S
-
- stack.Remove 1
- Do While stack(1) <> ";"
- If stack(1) <> "^" Then
- pStrs.Add stack(1)
- End If
- stack.Remove 1
- Loop
- stack.Remove 1
-
- Case 126
- '~
-
- pStrs.Add " "
-
- End Select
-
- End If
-
- Next i
- Set GetRtfString = pStrs
-
- End Function
- Private Function Hz2Py(ByVal HZ As String) As String
- Dim PY As String
- If Asc(HZ) < -20319 Or Asc(HZ) > -10247 Then
- GetPY = HZ
- Exit Function
- End If
- Select Case Asc(HZ)
- Case -20319 To -20318
- PY = "a"
- Case -20317 To -20305
- PY = "ai"
- Case -20304 To -20296
- PY = "an"
- Case -20295 To -20293
- PY = "ang"
- Case -20292 To -20284
- PY = "ao"
- Case -20283 To -20266
- PY = "ba"
- Case -20265 To -20258
- PY = "bai"
- Case -20257 To -20243
- PY = "ban"
- Case -20242 To -20231
- PY = "bang"
- Case -20230 To -20052
- PY = "bao"
- Case -20051 To -20037
- PY = "bei"
- Case -20036 To -20033
- PY = "ben"
- Case -20032 To -20027
- PY = "beng"
- Case -20026 To -20003
- PY = "bi"
- Case -20002 To -19991
- PY = "bian"
- Case -19990 To -19987
- PY = "biao"
- Case -19986 To -19983
- PY = "bie"
- Case -19982 To -19977
- PY = "bin"
- Case -19976 To -19806
- PY = "bing"
- Case -19805 To -19785
- PY = "bo"
- Case -19784 To -19776
- PY = "bu"
- Case -19775 To -19775
- PY = "ca"
- Case -19774 To -19764
- PY = "cai"
- Case -19763 To -19757
- PY = "can"
- Case -19756 To -19752
- PY = "cang"
- Case -19751 To -19747
- PY = "cao"
- Case -19746 To -19742
- PY = "ce"
- Case -19741 To -19740
- PY = "ceng"
- Case -19739 To -19729
- PY = "cha"
- Case -19728 To -19726
- PY = "chai"
- Case -19725 To -19716
- PY = "chan"
- Case -19715 To -19541
- PY = "chang"
- Case -19540 To -19532
- PY = "chao"
- Case -19531 To -19526
- PY = "che"
- Case -19525 To -19516
- PY = "chen"
- Case -19515 To -19501
- PY = "cheng"
- Case -19500 To -19485
- PY = "chi"
- Case -19484 To -19480
- PY = "chong"
- Case -19479 To -19468
- PY = "chou"
- Case -19467 To -19290
- PY = "chu"
- Case -19289 To -19289
- PY = "chuai"
- Case -19288 To -19282
- PY = "chuan"
- Case -19281 To -19276
- PY = "chuang"
- Case -19275 To -19271
- PY = "chui"
- Case -19270 To -19264
- PY = "chun"
- Case -19263 To -19262
- PY = "chuo"
- Case -19261 To -19250
- PY = "ci"
- Case -19249 To -19244
- PY = "cong"
- Case -19243 To -19243
- PY = "cou"
- Case -19242 To -19239
- PY = "cu"
- Case -19238 To -19236
- PY = "cuan"
- Case -19235 To -19228
- PY = "cui"
- Case -19227 To -19225
- PY = "cun"
- Case -19224 To -19219
- PY = "cuo"
- Case -19218 To -19213
- PY = "da"
- Case -19212 To -19039
- PY = "dai"
- Case -19038 To -19024
- PY = "dan"
- Case -19023 To -19019
- PY = "dang"
- Case -19018 To -19007
- PY = "dao"
- Case -19006 To -19004
- PY = "de"
- Case -19003 To -18997
- PY = "deng"
- Case -18996 To -18978
- PY = "di"
- Case -18977 To -18962
- PY = "dian"
- Case -18961 To -18953
- PY = "diao"
- Case -18952 To -18784
- PY = "die"
- Case -18783 To -18775
- PY = "ding"
- Case -18774 To -18774
- PY = "diu"
- Case -18773 To -18764
- PY = "dong"
- Case -18763 To -18757
- PY = "dou"
- Case -18756 To -18742
- PY = "du"
- Case -18741 To -18736
- PY = "duan"
- Case -18735 To -18732
- PY = "dui"
- Case -18731 To -18723
- PY = "dun"
- Case -18722 To -18711
- PY = "duo"
- Case -18710 To -18698
- PY = "e"
- Case -18697 To -18697
- PY = "en"
- Case -18696 To -18527
- PY = "er"
- Case -18526 To -18519
- PY = "fa"
- Case -18518 To -18502
- PY = "fan"
- Case -18501 To -18491
- PY = "fang"
- Case -18490 To -18479
- PY = "fei"
- Case -18478 To -18464
- PY = "fen"
- Case -18463 To -18449
- PY = "feng"
- Case -18448 To -18448
- PY = "fo"
- Case -18447 To -18447
- PY = "fou"
- Case -18446 To -18240
- PY = "fu"
- Case -18239 To -18238
- PY = "ga"
- Case -18237 To -18232
- PY = "gai"
- Case -18231 To -18221
- PY = "gan"
- Case -18220 To -18212
- PY = "gang"
- Case -18211 To -18202
- PY = "gao"
- Case -18201 To -18185
- PY = "ge"
- Case -18184 To -18184
- PY = "gei"
- Case -18183 To -18182
- PY = "gen"
- Case -18181 To -18013
- PY = "geng"
- Case -18012 To -17998
- PY = "gong"
- Case -17997 To -17989
- PY = "gou"
- Case -17988 To -17971
- PY = "gu"
- Case -17970 To -17965
- PY = "gua"
- Case -17964 To -17962
- PY = "guai"
- Case -17961 To -17951
- PY = "guan"
- Case -17950 To -17948
- PY = "guang"
- Case -17947 To -17932
- PY = "gui"
- Case -17931 To -17929
- PY = "gun"
- Case -17928 To -17923
- PY = "guo"
- Case -17922 To -17760
- PY = "ha"
- Case -17759 To -17753
- PY = "hai"
- Case -17752 To -17734
- PY = "han"
- Case -17733 To -17731
- PY = "hang"
- Case -17730 To -17722
- PY = "hao"
- Case -17721 To -17704
- PY = "he"
- Case -17703 To -17702
- PY = "hei"
- Case -17701 To -17698
- PY = "hen"
- Case -17697 To -17693
- PY = "heng"
- Case -17692 To -17684
- PY = "hong"
- Case -17683 To -17677
- PY = "hou"
- Case -17676 To -17497
- PY = "hu"
- Case -17496 To -17488
- PY = "hua"
- Case -17487 To -17483
- PY = "huai"
- Case -17482 To -17469
- PY = "huan"
- Case -17468 To -17455
- PY = "huang"
- Case -17454 To -17434
- PY = "hui"
- Case -17433 To -17428
- PY = "hun"
- Case -17427 To -17418
- PY = "huo"
- Case -17417 To -17203
- PY = "ji"
- Case -17202 To -17186
- PY = "jia"
- Case -17185 To -16984
- PY = "jian"
- Case -16983 To -16971
- PY = "jiang"
- Case -16970 To -16943
- PY = "jiao"
- Case -16942 To -16916
- PY = "jie"
- Case -16915 To -16734
- PY = "jin"
- Case -16733 To -16709
- PY = "jing"
- Case -16708 To -16707
- PY = "jiong"
- Case -16706 To -16690
- PY = "jiu"
- Case -16689 To -16665
- PY = "ju"
- Case -16664 To -16658
- PY = "juan"
- Case -16657 To -16648
- PY = "jue"
- Case -16647 To -16475
- PY = "jun"
- Case -16474 To -16471
- PY = "ka"
- Case -16470 To -16466
- PY = "kai"
- Case -16465 To -16460
- PY = "kan"
- Case -16459 To -16453
- PY = "kang"
- Case -16452 To -16449
- PY = "kao"
- Case -16448 To -16434
- PY = "ke"
- Case -16433 To -16430
- PY = "ken"
- Case -16429 To -16428
- PY = "keng"
- Case -16427 To -16424
- PY = "kong"
- Case -16423 To -16420
- PY = "kou"
- Case -16419 To -16413
- PY = "ku"
- Case -16412 To -16408
- PY = "kua"
- Case -16407 To -16404
- PY = "kuai"
- Case -16403 To -16402
- PY = "kuan"
- Case -16401 To -16394
- PY = "kuang"
- Case -16393 To -16221
- PY = "kui"
- Case -16220 To -16217
- PY = "kun"
- Case -16216 To -16213
- PY = "kuo"
- Case -16212 To -16206
- PY = "la"
- Case -16205 To -16203
- PY = "lai"
- Case -16202 To -16188
- PY = "lan"
- Case -16187 To -16181
- PY = "lang"
- Case -16180 To -16172
- PY = "lao"
- Case -16171 To -16170
- PY = "le"
- Case -16169 To -16159
- PY = "lei"
- Case -16158 To -16156
- PY = "leng"
- Case -16155 To -15960
- PY = "li"
- Case -15959 To -15959
- PY = "lia"
- Case -15958 To -15945
- PY = "lian"
- Case -15944 To -15934
- PY = "liang"
- Case -15933 To -15921
- PY = "liao"
- Case -15920 To -15916
- PY = "lie"
- Case -15915 To -15904
- PY = "lin"
- Case -15903 To -15890
- PY = "ling"
- Case -15889 To -15879
- PY = "liu"
- Case -15878 To -15708
- PY = "long"
- Case -15707 To -15702
- PY = "lou"
- Case -15701 To -15682
- PY = "lu"
- Case -15681 To -15668
- PY = "lv"
- Case -15667 To -15662
- PY = "luan"
- Case -15661 To -15660
- PY = "lue"
- Case -15659 To -15653
- PY = "lun"
- Case -15652 To -15641
- PY = "luo"
- Case -15640 To -15632
- PY = "ma"
- Case -15631 To -15626
- PY = "mai"
- Case -15625 To -15455
- PY = "man"
- Case -15454 To -15449
- PY = "mang"
- Case -15448 To -15437
- PY = "mao"
- Case -15436 To -15436
- PY = "me"
- Case -15435 To -15420
- PY = "mei"
- Case -15419 To -15417
- PY = "men"
- Case -15416 To -15409
- PY = "meng"
- Case -15408 To -15395
- PY = "mi"
- Case -15394 To -15386
- PY = "mian"
- Case -15385 To -15378
- PY = "miao"
- Case -15377 To -15376
- PY = "mie"
- Case -15375 To -15370
- PY = "min"
- Case -15369 To -15364
- PY = "ming"
- Case -15363 To -15363
- PY = "miu"
- Case -15362 To -15184
- PY = "mo"
- Case -15183 To -15181
- PY = "mou"
- Case -15180 To -15166
- PY = "mu"
- Case -15165 To -15159
- PY = "na"
- Case -15158 To -15154
- PY = "nai"
- Case -15153 To -15151
- PY = "nan"
- Case -15150 To -15150
- PY = "nang"
- Case -15149 To -15145
- PY = "nao"
- Case -15144 To -15144
- PY = "ne"
- Case -15143 To -15142
- PY = "nei"
- Case -15141 To -15141
- PY = "nen"
- Case -15140 To -15140
- PY = "neng"
- Case -15139 To -15129
- PY = "ni"
- Case -15128 To -15122
- PY = "nian"
- Case -15121 To -15120
- PY = "niang"
- Case -15119 To -15118
- PY = "niao"
- Case -15117 To -15111
- PY = "nie"
- Case -15110 To -15110
- PY = "nin"
- Case -15109 To -14942
- PY = "ning"
- Case -14941 To -14938
- PY = "niu"
- Case -14937 To -14934
- PY = "nong"
- Case -14933 To -14931
- PY = "nu"
- Case -14930 To -14930
- PY = "nv"
- Case -14929 To -14929
- PY = "nuan"
- Case -14928 To -14927
- PY = "nue"
- Case -14926 To -14923
- PY = "nuo"
- Case -14922 To -14922
- PY = "o"
- Case -14921 To -14915
- PY = "ou"
- Case -14914 To -14909
- PY = "pa"
- Case -14908 To -14903
- PY = "pai"
- Case -14902 To -14895
- PY = "pan"
- Case -14894 To -14890
- PY = "pang"
- Case -14889 To -14883
- PY = "pao"
- Case -14882 To -14874
- PY = "pei"
- Case -14873 To -14872
- PY = "pen"
- Case -14871 To -14858
- PY = "peng"
- Case -14857 To -14679
- PY = "pi"
- Case -14678 To -14675
- PY = "pian"
- Case -14674 To -14671
- PY = "piao"
- Case -14670 To -14669
- PY = "pie"
- Case -14668 To -14664
- PY = "pin"
- Case -14663 To -14655
- PY = "ping"
- Case -14654 To -14646
- PY = "po"
- Case -14645 To -14631
- PY = "pu"
- Case -14630 To -14595
- PY = "qi"
- Case -14594 To -14430
- PY = "qia"
- Case -14429 To -14408
- PY = "qian"
- Case -14407 To -14400
- PY = "qiang"
- Case -14399 To -14385
- PY = "qiao"
- Case -14384 To -14380
- PY = "qie"
- Case -14379 To -14369
- PY = "qin"
- Case -14368 To -14356
- PY = "qing"
- Case -14355 To -14354
- PY = "qiong"
- Case -14353 To -14346
- PY = "qiu"
- Case -14345 To -14171
- PY = "qu"
- Case -14170 To -14160
- PY = "quan"
- Case -14159 To -14152
- PY = "que"
- Case -14151 To -14150
- PY = "qun"
- Case -14149 To -14146
- PY = "ran"
- Case -14145 To -14141
- PY = "rang"
- Case -14140 To -14138
- PY = "rao"
- Case -14137 To -14136
- PY = "re"
- Case -14135 To -14126
- PY = "ren"
- Case -14125 To -14124
- PY = "reng"
- Case -14123 To -14123
- PY = "ri"
- Case -14122 To -14113
- PY = "rong"
- Case -14112 To -14110
- PY = "rou"
- Case -14109 To -14100
- PY = "ru"
- Case -14099 To -14098
- PY = "ruan"
- Case -14097 To -14095
- PY = "rui"
- Case -14094 To -14093
- PY = "run"
- Case -14092 To -14091
- PY = "ruo"
- Case -14090 To -14088
- PY = "sa"
- Case -14087 To -14084
- PY = "sai"
- Case -14083 To -13918
- PY = "san"
- Case -13917 To -13915
- PY = "sang"
- Case -13914 To -13911
- PY = "sao"
- Case -13910 To -13908
- PY = "se"
- Case -13907 To -13907
- PY = "sen"
- Case -13906 To -13906
- PY = "seng"
- Case -13905 To -13897
- PY = "sha"
- Case -13896 To -13895
- PY = "shai"
- Case -13894 To -13879
- PY = "shan"
- Case -13878 To -13871
- PY = "shang"
- Case -13870 To -13860
- PY = "shao"
- Case -13859 To -13848
- PY = "she"
- Case -13847 To -13832
- PY = "shen"
- Case -13831 To -13659
- PY = "sheng"
- Case -13658 To -13612
- PY = "shi"
- Case -13611 To -13602
- PY = "shou"
- Case -13601 To -13407
- PY = "shu"
- Case -13406 To -13405
- PY = "shua"
- Case -13404 To -13401
- PY = "shuai"
- Case -13400 To -13399
- PY = "shuan"
- Case -13398 To -13396
- PY = "shuang"
- Case -13395 To -13392
- PY = "shui"
- Case -13391 To -13388
- PY = "shun"
- Case -13387 To -13384
- PY = "shuo"
- Case -13383 To -13368
- PY = "si"
- Case -13367 To -13360
- PY = "song"
- Case -13359 To -13357
- PY = "sou"
- Case -13356 To -13344
- PY = "su"
- Case -13343 To -13341
- PY = "suan"
- Case -13340 To -13330
- PY = "sui"
- Case -13329 To -13327
- PY = "sun"
- Case -13326 To -13319
- PY = "suo"
- Case -13318 To -13148
- PY = "ta"
- Case -13147 To -13139
- PY = "tai"
- Case -13138 To -13121
- PY = "tan"
- Case -13120 To -13108
- PY = "tang"
- Case -13107 To -13097
- PY = "tao"
- Case -13096 To -13096
- PY = "te"
- Case -13095 To -13092
- PY = "teng"
- Case -13091 To -13077
- PY = "ti"
- Case -13076 To -13069
- PY = "tian"
- Case -13068 To -13064
- PY = "tiao"
- Case -13063 To -13061
- PY = "tie"
- Case -13060 To -12889
- PY = "ting"
- Case -12888 To -12876
- PY = "tong"
- Case -12875 To -12872
- PY = "tou"
- Case -12871 To -12861
- PY = "tu"
- Case -12860 To -12859
- PY = "tuan"
- Case -12858 To -12853
- PY = "tui"
- Case -12852 To -12850
- PY = "tun"
- Case -12849 To -12839
- PY = "tuo"
- Case -12838 To -12832
- PY = "wa"
- Case -12831 To -12830
- PY = "wai"
- Case -12829 To -12813
- PY = "wan"
- Case -12812 To -12803
- PY = "wang"
- Case -12802 To -12608
- PY = "wei"
- Case -12607 To -12598
- PY = "wen"
- Case -12597 To -12595
- PY = "weng"
- Case -12594 To -12586
- PY = "wo"
- Case -12585 To -12557
- PY = "wu"
- Case -12556 To -12360
- PY = "xi"
- Case -12359 To -12347
- PY = "xia"
- Case -12346 To -12321
- PY = "xian"
- Case -12320 To -12301
- PY = "xiang"
- Case -12300 To -12121
- PY = "xiao"
- Case -12120 To -12100
- PY = "xie"
- Case -12099 To -12090
- PY = "xin"
- Case -12089 To -12075
- PY = "xing"
- Case -12074 To -12068
- PY = "xiong"
- Case -12067 To -12059
- PY = "xiu"
- Case -12058 To -12040
- PY = "xu"
- Case -12039 To -11868
- PY = "xuan"
- Case -11867 To -11862
- PY = "xue"
- Case -11861 To -11848
- PY = "xun"
- Case -11847 To -11832
- PY = "ya"
- Case -11831 To -11799
- PY = "yan"
- Case -11798 To -11782
- PY = "yang"
- Case -11781 To -11605
- PY = "yao"
- Case -11604 To -11590
- PY = "ye"
- Case -11589 To -11537
- PY = "yi"
- Case -11536 To -11359
- PY = "yin"
- Case -11358 To -11341
- PY = "ying"
- Case -11340 To -11340
- PY = "yo"
- Case -11339 To -11325
- PY = "yong"
- Case -11324 To -11304
- PY = "you"
- Case -11303 To -11098
- PY = "yu"
- Case -11097 To -11078
- PY = "yuan"
- Case -11077 To -11068
- PY = "yue"
- Case -11067 To -11056
- PY = "yun"
- Case -11055 To -11053
- PY = "za"
- Case -11052 To -11046
- PY = "zai"
- Case -11045 To -11042
- PY = "zan"
- Case -11041 To -11039
- PY = "zang"
- Case -11038 To -11025
- PY = "zao"
- Case -11024 To -11021
- PY = "ze"
- Case -11020 To -11020
- PY = "zei"
- Case -11019 To -11019
- PY = "zen"
- Case -11018 To -11015
- PY = "zeng"
- Case -11014 To -10839
- PY = "zha"
- Case -10838 To -10833
- PY = "zhai"
- Case -10832 To -10816
- PY = "zhan"
- Case -10815 To -10801
- PY = "zhang"
- Case -10800 To -10791
- PY = "zhao"
- Case -10790 To -10781
- PY = "zhe"
- Case -10780 To -10765
- PY = "zhen"
- Case -10764 To -10588
- PY = "zheng"
- Case -10587 To -10545
- PY = "zhi"
- Case -10544 To -10534
- PY = "zhong"
- Case -10533 To -10520
- PY = "zhou"
- Case -10519 To -10332
- PY = "zhu"
- Case -10331 To -10330
- PY = "zhua"
- Case -10329 To -10329
- PY = "zhuai"
- Case -10328 To -10323
- PY = "zhuan"
- Case -10322 To -10316
- PY = "zhuang"
- Case -10315 To -10310
- PY = "zhui"
- Case -10309 To -10308
- PY = "zhun"
- Case -10307 To -10297
- PY = "zhuo"
- Case -10296 To -10282
- PY = "zi"
- Case -10281 To -10275
- PY = "zong"
- Case -10274 To -10271
- PY = "zou"
- Case -10270 To -10263
- PY = "zu"
- Case -10262 To -10261
- PY = "zuan"
- Case -10260 To -10257
- PY = "zui"
- Case -10256 To -10255
- PY = "zun"
- Case -10254 To -10248
- PY = "zuo"
- End Select
- Hz2Py = PY
- End Function
- Public Function Hz2Pys(ByVal HZString As String) As String
- Dim i As Integer
- Dim PYString As String
- PYString = ""
- For i = 1 To Len(HZString)
- PYString = PYString & Hz2Py(Mid(HZString, i, 1)) & " "
- Next
- PYString = Left(PYString, Len(PYString) - 1)
- Hz2Pys = PYString
- End Function