3D Design

3D Design

Hello, Is it possible to export the datum point’s xyz coordinates from SpaceClaim to an Excel file?

Tagged: ,

    • Karthi111
      Subscriber
    • Naresh Patre
      Ansys Employee

      I think this could be possible through Scripting. You will have to loop over each point to access its coordinates and then write them out in an excel file.
    • Rahul Kumbhar
      Ansys Employee
      You can try save file as ANF file and open it in text editor. I will give you information points with its coordinates
    • Andrew Stankovich
      Ansys Employee

      If you want to try using scripting as a solution something like this might suit your needs.
      #Prompt the user to define a save file
      outputDialog=SaveFileDialog
      outputDialog.Filter=”Datum Point File (*.csv)|*.csv”
      outputDialog.Show
      outputfile=outputDialog.FileName

      #Get all the datum points in the current file
      allDatumPoints=GetRootPart().GetDescendants[IDatumPoint]()

      #Loop through all the points and save the x,y,z coordinates to file.
      with open(outputfile,”w+”) as outFile:
      for dPoint in list(allDatumPoints):
      X=dPoint.Position.X
      Y=dPoint.Position.Y
      Z=dPoint.Position.Z
      outFile.write(str(X)+”,”+str(Y)+”,”+str(Z)+”\n”)
      This will write the files to a csv file that can be opened in excel.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.