|
|
发表于 2024-11-4 23:24:17
|
显示全部楼层
本帖最后由 xinruyu369 于 2024-11-4 23:40 编辑 : l. }( [1 a2 F2 w
3 `5 K6 r9 T- d# R3 d: M
" j3 D6 I! g' V* Iusing System;6 @; ^3 a+ K2 e' x; @& ~& o
using System.Diagnostics;
! e! ]% v9 ?/ R/ N( N+ r( g( g& e1 u
^& f E& y' Z1 ]8 N) y var currentFile = Mastercam.IO.FileManager;
- d) k, W/ ~) e) [5 r0 X6 yif (currentFile!= null)' T& X; _6 a! y" U. K6 ~: w
{
3 I3 K3 j% c7 _4 D string currentFilePath = currentFile.Path;
+ }$ v! K1 y8 {( f' V* F string currentFolder = Path.GetDirectoryName(currentFilePath);
2 D# s- A# V% x% K$ p Process.Start("explorer.exe", currentFolder);
1 Y8 }/ J3 I; b5 G$ q+ j& a}$ h7 {- g( L4 X7 n. m) a
版主,您好,指点一下这个需要获取路径要怎么写啊?4 L0 U# z- E$ c9 S
|
|