Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Python macro using NX Open API to create a simple line between two points.
import NXOpen
def main():
session = NXOpen.Session.GetSession()
workPart = session.Parts.Work
point1 = NXOpen.Point3d(0.0, 0.0, 0.0)
point2 = NXOpen.Point3d(100.0, 100.0, 0.0)
workPart.Curves.CreateLine(point1, point2)
if __name__ == "__main__":
main()NX Open Macros is a scripting interface for Siemens NX (formerly Unigraphics NX), allowing automation of CAD, CAM, and CAE tasks. It provides programmatic control of NX functions using recorded macros, VB, or Python scripts.
Origin & Creator
Developed by Siemens Digital Industries Software to extend NX capabilities with custom automation and scripting.
Industrial Note
NX Open Macros are specialized for CAD/CAM/CAE automation, enabling engineers to reduce repetitive tasks, enforce design standards, and integrate NX with enterprise systems.