Python - Pass value to test script

Python - Pass value to test script

Anonymous
Not applicable
839 Views
3 Replies
Message 1 of 4

Python - Pass value to test script

Anonymous
Not applicable

Is possible to pass values to a test script?  Either directly or by reading from a text file. Thanks.

0 Likes
Accepted solutions (1)
840 Views
3 Replies
Replies (3)
Message 2 of 4

h_eger
Mentor
Mentor
Accepted solution

Dear @Anonymous,

 

these two variants for the test script are available to you.

TESTACPSCRIPT / TESTACPSCRIPT1

To test and check the geometry body we have the AutoLISP® function TESTACPSCRIPT and TESTACPSCRIPT1 created.

The first parameter at booth script types is the variants name (like "CPFLR")

The next parameters for TESTACPSCRIPT are couples of values: the fieldname and the needed value (like "D1" "300.5").

For TESTACPSCRIPT1 we have to set all the parameters inside 1 string (like it’s done inside catalog/spec dbs: “D1=300.5”)

If a field isn't set the function takes the default values from the variants definition.

 

 

That looks like:

(TESTACPSCRIPT "CPFLR")

 

(TESTACPSCRIPT "CPFLR" "D1" "300.5")

 

(TESTACPSCRIPT "CPFLR" "L" "40" "D1" "300.5" "D2" "88.9")

Or

(TESTACPSCRIPT1 "CPFLR")

 

(TESTACPSCRIPT1 "CPFLR" "D1=300.5")

 

(TESTACPSCRIPT1 "CPFLR" "L=40,D1=300.5,D2=88.9")

 

Before we can use TESTACPSCRIPT or TESTACPSCRIPT1 inside Plant 3D we have to load PnP3dACPAdapter.arx.

That can be done with

(arxload "PnP3dACPAdapter.arx")

or with the appload function

-

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 4

Anonymous
Not applicable

Thank you. Where is that excerpt from? 

0 Likes
Message 4 of 4

h_eger
Mentor
Mentor

Dear @Anonymous,

 

Internal documentation of Autodesk development

 

 

-

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