Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep 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
Joined
Nov 1, 2022
Messages
3
Location
IN
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

Back
Top