Custom Scripts disappearing from the Spec editor

Custom Scripts disappearing from the Spec editor

jovan.maharaj
Enthusiast Enthusiast
296 Views
4 Replies
Message 1 of 5

Custom Scripts disappearing from the Spec editor

jovan.maharaj
Enthusiast
Enthusiast

Hi All

 

I have been working on a new custom script for valves & valve bodies. The script works in cad and generates the object when you run the TESTACPSCRIPT command, and did appear in the create new component dialogue box of spec editor. However after fixing an issue in the code and running PLANTREGISTERCUSTOMSCRIPTS, all of my custom scripts have disappeared from the create new component dialogue box of spec editor, including ones I had previously wrote and ones that were purchased. If I run the TESTACPSCRIPT command, the object generates with no issues. Plant 3d, itself, does recognized any components that were created with the other custom scripts. I am just unable to create new parts in spec editor using any custom script parts.

 

Does anyone know what could cause this issue?

I have tried both Plant 3D 2024 & 2023 and have had the same issue.

Please see attached the python script.

 

Thank you 🙂

0 Likes
Accepted solutions (1)
297 Views
4 Replies
Replies (4)
Message 2 of 5

h_eger
Mentor
Mentor

@jovan.maharaj ,

 

works for me without any problems.
Content path correct?
When were the last Python scripts added?
Has the path changeover 2022 been implemented?

https://asti.com/blog/migrating-shared-content-to-plant-3d-2022/

 

25-03-2025_12-19-05.jpg

-

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).

Hartmut Eger
Senior Engineer
Anlagenplanung + Elektotechnik
XING | LinkedIn

EESignature



0 Likes
Message 3 of 5

matt.worland
Collaborator
Collaborator

Are you getting any errors when running PlantRegisterCustomScripts (PRCS)? Another file could be causing an error.

Do you still have all of the pyc and XML files after running PRCS?
Restart the Spec Editor?

If my reply was helpful, please give a "Thumbs Up" or "Accept as Solution"
Message 4 of 5

jovan.maharaj
Enthusiast
Enthusiast
Accepted solution

@h_eger The content path was correct and I was using the default shared content path for plant 3d 2024, which I did check against the Asti blog post.

 

@matt.worland I did not get any errors while running PLANTRERISTERCUSTOMSCRIPTS. I restarted spec editor, my pc and even run the local cache purge for plant.

 

I have come right with my problem, I created a new custom scripts folder with just the script I attached, and it seems to work fine. So one of the files in my old custom scripts folder might be the issue, I'm guessing.

 

jovanmaharaj_0-1742967871126.png

 

Thanks a lot for the help 🙂 @matt.worland @h_eger 

 

 

 

 

0 Likes
Message 5 of 5

roy
Contributor
Contributor

I had this happen to me last week as well. I was able to narrow the offending script down to a single file. After a bit of mucking around the issue turned out to be the "TooltipShort" field in the "@activate(Group=" line of code. It had too many characters in it. Everything worked fine with the "testacpscript" etc but what I think is happening is that it is unable to overlay the TooltipShort valve over the block based graphics icon and so the software stops loading any of the other custom scripts.

After reducing the number of characters everything went back to normal. I guess the lesson was "TooltipShort" means short. Sorry but I did not dig into what the magic number of characters is that will break things.

0 Likes