Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get 2D point coordinates

Status
Not open for further replies.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor