Hello community,
is there any way I can programmatically remove a project node from the Project Manager if the file does not exist anymore?
Whenever I delete a project file from my hard drive, I need the Project Manager to update itself and remove the corresponding project nodes, without having to restart AutoCAD Electrical. Currently, it only changes the project status to "Not found".
Is there a Lisp routine or even an ObjectARX API that can do something like this? If the deleted project was the last project in the list, the Project Manager needs to be empty, just like when I restart the CAD afterwards.
Unfortunately, neither the command "ace_closeproject" nor the right click menu option "Close" work for the (last) active project.
It would be great if someone could help me with that.
Kind regards,
Bettina
Solved! Go to Solution.
Solved by rhesusminus. Go to Solution.
Hi rhesusminus,
thank you for your quick reply.
I just tried out your suggestion in the AutoLisp console, but all the function did was returning 'T'. The project remained in the Project Manager, regardless of whether it was active or the last project or not.
I tried the file path with forward slashes, single backward slashes and double backward slashes, but the result was always the same.
(wd_pds_close_project "C:/Users/bettina.sprenger/Documents/Acade 2017/AeData/Proj/NfpaDemo/Nfpademo.wdp") (wd_pds_close_project "C:\Users\bettina.sprenger\Documents\Acade 2017\AeData\Proj\NfpaDemo\Nfpademo.wdp") (wd_pds_close_project "C:\\Users\\bettina.sprenger\\Documents\\Acade 2017\\AeData\\Proj\\NfpaDemo\\Nfpademo.wdp")
Am I missing something?
Kind regards,
Bettina
Sorry, my bad. That command is only for the PDS, opening and closing a project "in memory", and not in the project manager.
Then, I'm all out of ideas. Can't find any documented ways to achieve this.
Hi rhesusminus,
nevertheless, thanks for your efforts.
I will close this topic.
Have a nice day,
Bettina
bummer.
The more I try to use these APIs the more road blocks I encounter.
There's a reason I call it an "API".
It's really bad.
Hi
I think you can do this externly of AutoCAD electrical
Have a look to the Text file LASTPROJ.FIL, you can delete the line you need and restart electrical
It's a matter of workflow that is easily solved...
You just need to train yourself to CLOSE the project in the Project Manager BEFORE you move or delete the project.
This will solve ALL the problems without having to re-start ACADE
Where you only have the one project open, I would suggest a placeholder project just to have a project in the list if you need to close the Active project. You can then use the placeholder project for those small single dwg jobs or testing if something will work before it's applied to a working project.
Regards Brad
Brad Coleman, Electrical Draftsman
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.