ZBrushCentral

zBrush writing to a file

Hi all,

I need to write text to a file or create a new file to write text. I don’t believe this exists in the ZFileUtils64.dll, at least I dont know because I can’t seem to open it.

Is there an existing way to do this?

Is there a way for me to view the ZFileUtils64.dll?

Is there a guide to actually writing a ZFileUtils64.dll?

How do I compile a ZFileUtils64.dll?

Sorry, just haven’t seen a ton of docs on dlls

thanks!

You don’t need a special DLL to write text to a file, you can do it using zscript.

I’ve attached a sample script. Load it using the Load button in the ZScript palette. The buttons will appear at the bottom of the UI - press ‘H’ on the keyboard to show the window.

The first button will write a couple of lines of text and save them to a file called “output.txt” in the same location as the script. The second button loads the file and reads back the text, one line at a time.

Let me know if you’ve any questions.

Download here:

Awesome! Thanks so much! That is very helpful. Is there a way to get a copy of the an encrypted ZFileUtils64.dll so that I see what it looks like and extend it if needed?

The ZFileUtils is explained here: http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/zfileutils/ The actual code is not available. If there’s a function that you think would be generally useful then suggest it and I’ll consider adding it. However functions that directly manipulate ZBrush data are not possible as they would involve updating ZBrush itself.

If you are interested in writing your own DLL then you’ll need to learn C++ programming. There’s some information in this thread that outlines what’s necessary: http://www.zbrushcentral.com/showthread.php?193080-Writing-Dll-files-for-Zbrush