Get Note Values with a Macro
Get Note Values with a Macro
(OP)
Hello All,
How could I access and read text under "Notes:" as seen in the picture below?

Below is my code up to now and I am stuck.
Dim oSel As Selection
oSel = oCAT.ActiveDocument.Selection
oSel.Clear() '// Clear selection before selection starts
oSel.Search("Name = Notes*, All")
Dim TextAsString As String
TextAsString = oCAT.ActiveDocument.Selection.Item(1).Value.Text.Text
MsgBox(TextAsString)
Thank you for your help in advance
How could I access and read text under "Notes:" as seen in the picture below?

Below is my code up to now and I am stuck.
Dim oSel As Selection
oSel = oCAT.ActiveDocument.Selection
oSel.Clear() '// Clear selection before selection starts
oSel.Search("Name = Notes*, All")
Dim TextAsString As String
TextAsString = oCAT.ActiveDocument.Selection.Item(1).Value.Text.Text
MsgBox(TextAsString)
Thank you for your help in advance





RE: Get Note Values with a Macro
below are the lines generated by CATIA:
Dim parameters1 As Parameters
Set parameters1 = part1.Parameters
Dim hybridBodies1 As HybridBodies
Set hybridBodies1 = part1.HybridBodies
Dim orderedGeometricalSet1 As OrderedGeometricalSet
Set orderedGeometricalSet1 = hybridBodies1.Item("Geometrical Set.1")
Dim parameters2 As Parameters
Set parameters2 = parameters1.SubList(orderedGeometricalSet1, True)
Dim length1 As Length
Set length1 = parameters2.CreateDimension("", "LENGTH", 0#)
the key to success here is the SubList of the parameter collection, the one that deals with Geometrical Set.1...
here I created a length parameter, but equally well I could read one...
good luck!
regards,
LWolf
RE: Get Note Values with a Macro
I want to read and export "Notes" values from a CATPart model rather than creating/reading a new geometric set from CATPart model.
Any idea how to achieve it?