Logging in script

How should I log a file and understand what is wrong in the attached library PenetrationsEX.dll?

I create a file with a .py extension and include library like this

doc = __revit__.ActiveUIDocument.Document
__assembly__ = "PenetrationsEX"
__commandclass__ = "LinkSectionBox".

but class LinkSectionBox is not running.

Hi @Andrey-SPGR,

Just to be sure:

  • Is the script called script.py? pyrevit will only run a file named like that
  • does the name of the folder in which you put the script end with .linkbutton? this is the suffix for running external dll commands

I’m afraid you can’t add logging for this kind of buttons, but you could try to CTRL+Click on the button to see the pyrevit runtime debug logging and see if it says something about loading the dll

1 Like

now the structure is like this. Should I create folder .linkbutton here?

No, you should rename the .pushbutton to .linkbutton

1 Like

after renaming the folder, writes the following message

Can not find target file

you might have to reload pyRevit or restart Revit

happened. all the best and thank you!