Тема: AcadDictionary и AcadXRecord
Доброе утро! По работе с AcadDictionary возник вопрос :
- какая максимальная длина имени AcadXRecord?
- имя должно быть уникальным?
- XRecordData - максимальная длина?
Dim DictScale As AcadDictionary, dicXRecord As AcadXRecord Dim XRecordDataType As Variant, XRecordData As Variant Dim ArraySize As Long, iCount As Long Dim DataType As Integer, Data As String, msg As String ' Unique identifiers to distinguish this XRecordData from other XRecordData Const TYPE_STRING = 1 Const DICT_NAME = "Ts_Dict_Products" Const XRECORD_NAME = "Ts_File_Products" Dict_Scale = False ' Connect to the dictionary in which to store the XRecord On Error GoTo CREATE Set DictScale = ThisDrawing.dictionaries(DICT_NAME) Set dicXRecord = DictScale.GetObject(XRECORD_NAME) On Error GoTo 0 ' Get current XRecordData dicXRecord.GetXRecordData XRecordDataType, XRecordData If VarType(XRecordData) <> vbEmpty Then fl_Scale = XRecordData(0) fl_Scale_Num1 = XRecordData(1) fl_Scale_Num2 = XRecordData(2) Kod_Sector = XRecordData(3) Name_Sector = XRecordData(4) Endif