Sarath007
Mechanical
- Nov 1, 2022
- 3
Hi,
I have create point in part level then i have placed the view. In view properties, I checked the box 3D points. I filter points using selection.Search "Name='GeneratedPoint',all".but i could not get the coordinates of those points.
Please provide the solution
Sub main()
Dim i As Integer
Dim coord(1)
Dim dwgDoc As DrawingDocument
Set dwgDoc = CATIA.ActiveDocument
Dim dwgViews As DrawingViews
Set dwgViews = CATIA.ActiveDocument.Sheets.ActiveSheet.Views
Dim dwgView As DrawingView
Set dwgView = dwgViews.Activeview
Dim TheSPAWorkbench As Workbench
Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench("SPAWorkbench")
Set Document = CATIA.ActiveDocument
Dim selection As Object
Set selection = Document.selection
selection.Clear
selection.Search "Name='GeneratedPoint',all"
Dim CATPointCoord(2)
MsgBox selection.Item(1).Value.Name
selection.Item(1).GetCoordinates CATPointCoord
End Sub
Regards,
Sarathkumar
I have create point in part level then i have placed the view. In view properties, I checked the box 3D points. I filter points using selection.Search "Name='GeneratedPoint',all".but i could not get the coordinates of those points.
Please provide the solution
Sub main()
Dim i As Integer
Dim coord(1)
Dim dwgDoc As DrawingDocument
Set dwgDoc = CATIA.ActiveDocument
Dim dwgViews As DrawingViews
Set dwgViews = CATIA.ActiveDocument.Sheets.ActiveSheet.Views
Dim dwgView As DrawingView
Set dwgView = dwgViews.Activeview
Dim TheSPAWorkbench As Workbench
Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench("SPAWorkbench")
Set Document = CATIA.ActiveDocument
Dim selection As Object
Set selection = Document.selection
selection.Clear
selection.Search "Name='GeneratedPoint',all"
Dim CATPointCoord(2)
MsgBox selection.Item(1).Value.Name
selection.Item(1).GetCoordinates CATPointCoord
End Sub
Regards,
Sarathkumar