add new python file to spec editor

add new python file to spec editor

DGRL
Advisor Advisor
751 Views
6 Replies
Message 1 of 7

add new python file to spec editor

DGRL
Advisor
Advisor

Hi

 

Is it possible to add python files to the spec editor? Now Plant 3D comes with a standard selection of for example supports. I would like to add a few extra. I know the variants.zip file but is this file used by the spec editor?

ANd if yes can i just add newly made compiles (PYC) python files to it?

 

If this was of any help please kudo and/or Accept as Solution
Kind Regards
0 Likes
752 Views
6 Replies
Replies (6)
Message 2 of 7

h_eger
Mentor
Mentor

Dear @DGRL ,

 

new Python scripts can only be added to the SpecEditor via user-defined Python scripts.

There is no other way to make Python scripts available in Plant 3D.

-

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



Message 3 of 7

DGRL
Advisor
Advisor

Dear @h_eger 

 

Thanks for your answer. I assume that the scipts needs to be placed in this folder,

AutoCAD Plant 3D 2019 Content\CPak Common\CustomScripts. Am i correct?

 

If this was of any help please kudo and/or Accept as Solution
Kind Regards
0 Likes
Message 4 of 7

h_eger
Mentor
Mentor

Hi Don,

 

yes this is the place.
We need the * .py files in this folder.
Then execute the "PLANTREGISTERCUSTOMSCRIPTS" command in Plant 3D.
With this command "PLANTREGISTERCUSTOMSCRIPTS" you commpillate from the "* .py" files * .pyc files.
Attached is the documentation for the Python user scripting.

-

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



Message 5 of 7

DGRL
Advisor
Advisor

@h_eger 

 

Thanks 

I did it in a slightly different way.

See the files below. I added them in the customscripts folder

DGRL_1-1602751028182.png

Now this becomes available in speceditor and After restarting P3D you can place the spec item
In this case i made an custom support with a param that can change the angle of the brackets.
Standard this is 90 degrees in P3D and now i can make them any angle I like (45 degrees is mostly used in the world)

 

Thanks @h_eger 

 

 

DGRL_0-1602750986446.png

 

If this was of any help please kudo and/or Accept as Solution
Kind Regards
0 Likes
Message 6 of 7

George.Endrulat
Advisor
Advisor

Can you provide another link to that file?  It only says that the site has closed the connection and I can't download it.  Thank you.

George

If my post offers a solution, please click "Accept as Solution"
0 Likes
Message 7 of 7

DGRL
Advisor
Advisor

@George.Endrulat 

 

I just downloaded the file again. Seems to work 

 

If this was of any help please kudo and/or Accept as Solution
Kind Regards
0 Likes