Retrieve the current directory of an open project in Ansys Space Claim with C#

Ansys Staff
Ansys Staff Member, Employee Posts: 24
Ansys Employee Name Dropper First Comment Photogenic
✭✭✭✭
edited June 2023 in 3D Design

How can I retrieve the current directory of an open project in Ansys Space Claim in C#.

This is for a personalized tool embedded in the tool bar.

Answers

  • Valérie Gelbgras
    Valérie Gelbgras Member, Employee Posts: 157
    50 Answers 100 Likes 10 Comments Name Dropper
    ✭✭✭✭
    Answer ✓

    With .Path from the document. Here is an example:

    var window = Window.ActiveWindow;
    var doc = window?.Document;
    string docPath = doc.Path;