Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
3D设计

3D设计

SpaceClaim中,如何将点坐标xyz导出到Excel文件?

    • Huadong Sun
      Ansys Employee
    • Huadong Sun
      Ansys Employee

      可以使用脚本作为解决方案,将文件写入csv文件。

      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')

Viewing 1 reply thread
  • 主题 ‘SpaceClaim中,如何将点坐标xyz导出到Excel文件?’ 已关闭新回复.
[bingo_chatbox]