Skip to main content
14-Alexandrite
February 20, 2024
Solved

APTCUSTOM value issue.

  • February 20, 2024
  • 1 reply
  • 1823 views

I read the APTCUSTOM value using local tmpPath = $main::ENV['APTCUSTOM'];

If I look at the string showing it with response($tmpPath); it works well but when I pass that value to a js function, inside that function the string is unreadable and therefore I cannot construct a path with it.

What to do in order to pass what response popup shows ?

 

 

Best answer by Partner

Awkward, I simply  had to add an additional \ where a single one was present and then using it worked.

I'll need to close that ticket...

Thanks.

1 reply

16-Pearl
February 20, 2024

The relevant documentation is here and it does kind of cover what I think you're asking: https://support.ptc.com/help/arbortext/r8.2.1.0/en/#page/Program%2Facl_ref%2Fhelp1436.html%23

 

# get an environment variable
tmpPath = $main::ENV['APTCUSTOM'];

# show the value
response($tmpPath);

# pass the value to Javascript alert popup
result = javascript('alert("' . $tmpPath . '")')
Partner14-AlexandriteAuthorAnswer
14-Alexandrite
February 21, 2024

Awkward, I simply  had to add an additional \ where a single one was present and then using it worked.

I'll need to close that ticket...

Thanks.