Hello, everyone
I use a CATScript macro which fills the title block of a drawing with information (PartNumber, Definition, Nomenclature, Mass) taken from the reference model. This macro does it this way:
Dim TextFrame1, TextFrame2, TextFrame3, TextFrame4 as String
Dim DrwSheet as DrawingSheet
Set DrwSheet = Catia.ActiveDocument.Sheets.ActiveSheet
TextFrame1 = DrwSheet.Views.Item("Front view" .GenerativeBehavior.Document.PartNumber
TextFrame2 = DrwSheet.Views.Item("Front view" .GenerativeBehavior.Document.Definition
TextFrame3 = DrwSheet.Views.Item("Front view" .GenerativeBehavior.Document.Nomenclature
TextFrame4 = CStr(DrwSheet.Views.Item("Front view" .GenerativeBehavior.Document.Analyze.Mass)
But now I’ve encountered problem with using this structure in VB6 program. In VB the line
Catia.ActiveDocument.Sheets.ActiveSheet.Views.Item("Front view" .GenerativeBehavior.Document
returns object of AnyType class which has only .Application .GetItem .Name .Parent members and nothing more. I tried to use other methods and properties of Document class (such as .Path or .Fullname), but haven’t succeeded.
How do I retrieve the needed information of the “Front view” reference model in VB? Please help me…. |