DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Python button doesn't work for example code in documentation

Hello all, 

 

When I press the "python" button on a page such as the one below, I would expect to see a piece of Python example code. This doesn't happen (on brave and microsoft edge). Could someone from Diadem fix this please?

https://www.ni.com/docs/en-US/bundle/diadem-api-ref/page/comoff/chnconverttimetonumeric.htm

 

In the offline help documentation it does work properly. 

 

Many thanks! 

0 Kudos
Message 1 of 5
(315 Views)

Does anyone have any ideas for this? 

 

Many thanks! 

0 Kudos
Message 2 of 5
(247 Views)

Same for me. 

0 Kudos
Message 3 of 5
(188 Views)

Hello,

 

The online documentation uses dynamic JavaScript to switch code examples.
Some browsers (especially Brave, which blocks scripts and trackers by default) may prevent the code toggle from working.
Edge may also block certain scripts depending on privacy settings or extensions.

 

Option How to Do It
Use Offline Help Open DIAdem, go to Help > API Reference. The Python toggle works here.
Try Chrome or Firefox These browsers are less likely to block the script.
Disable Shields/Extensions In Brave, turn off “Shields” for ni.com. In Edge, disable privacy extensions.
View Page Source Sometimes, the Python code is present in the HTML and can be found manually.

 

Souha

0 Kudos
Message 4 of 5
(131 Views)

Thanks! I'll give it a try. 

 

The question behind the question is actually that I've noticed that Python in DIAdem works together quite poorly with AI chatbots. My suspicion is that this is so because of the lack of online python Diadem examples and documentation. So i was thinking if we can expose the DIAdem Python syntax better (by fixing this issue with the button), that would also improve the interaction with AI bots. However if it's because of script blocking (and the Python code is actually already there so that an AI bot can see it) then this wouldn't really make any difference. 

 

If anyone has found another way to deal with this I would be very interested to hear! 

0 Kudos
Message 5 of 5
(97 Views)