|
|
发表于 2024-11-4 23:24:17
|
显示全部楼层
本帖最后由 xinruyu369 于 2024-11-4 23:40 编辑 4 @# z( V/ ?( \: f+ s. a) I
% W2 u0 \- n3 y- Y. `6 r' A% w- Y
using System;7 ?& C# i3 V* Y! I4 |6 i$ Y- o: m
using System.Diagnostics;9 k4 W8 I6 e0 K0 O2 B
% o' S. L- p/ C8 ~* z
var currentFile = Mastercam.IO.FileManager;; E: F- T0 q% n$ v- x, g, S
if (currentFile!= null)- K0 J2 v; G9 T h: R# R" h) g" l8 {
{5 T. } f2 @0 l7 q+ P4 q5 u
string currentFilePath = currentFile.Path;1 M* s7 ]& v4 k* A* W
string currentFolder = Path.GetDirectoryName(currentFilePath);
" F% X2 n- S4 S4 q/ T8 b; ~( J1 M Process.Start("explorer.exe", currentFolder);
" [7 F7 D2 ^- G# n. E% E}
8 }3 H( r, s, y+ {& W7 x版主,您好,指点一下这个需要获取路径要怎么写啊?
# Z0 @" \) Y# g/ y, }7 l |
|