I’m pretty new at VBScripting so maybe this question is a bit basic but anyway =)
I’m trying to create a script that enables me to chooose a point (or multiple points) and then the script should put coordinate dimensions on that point and then create a text on the inserted coordinate dimensions (not on the point because then it doesn’t follow the coordinate dimensions when they are moved). The text should be the name of the point selected.
I’ve gotten this far:
Dim oSel As Selection
Set oSel = CATIA.ActiveDocument.Selection
Dim i As Integer
For i = 1 To oSel.Count
Dim oSelEl As SelectedElement
Set oSelEl = oSel.Item(i)
MsgBox “Name ” & oSelEl.Value.Name
CATIA.StartCommand “Coordinate Dimensions”
However this does automaticly choose the inserted coordinate dimensions or enter the name of the point.
Hi Niklas. The first step is to choose a point or multiple points – how do you want to accomplish that? By user selection before the macro is started, by user selection while the macro is running, or automatically with macro searching for points by name or type?
Hi Emmet. The point, or points, could be selected before the macro is started. I want the text to be the name of the point. There is no need to search automatically for the point since the names doesn’t allways follow a strict nomenclature.