Notifications
Clear all

[Closed] fileProperties – new line characters?

Hey all,
Trying to do something quick with file properties… I have some custom attributes that I would like to copy to the “summary info” description field (also file properties > summary > comments field), but it does not appear to be observing newline characters that are being written to it by maxscript…

I’m collecting data from the custom properties and then creating a new string on the fly to write to that value. I start by querying what’s already there…

data = ((fileProperties.getPropertyValue #summary 8) + "
")

then iterate over an array and append to the string…

for i=1 to NameArr.count do
(
	append data (NameArr[i] + " " + RangeArr[i] + "
")
)

then write that to the file properties…

fileProperties.addProperty #summary "comments" data

What I expect is that my data will show up in the properties window in the format:
foo
bar
guh

If I open the summary info, I get data in the format of:
foobarguh

If I query that value (fileProperties.getPropertyValue #summary 8) and print it, the result is my desired format (with the newlines being observed). It seems that for some reason the summary info is not observing my newline characters despite them still being present in the string… Has anyone else found a workaround for inserting newline characters into strings for use in this summary info?

2 Replies
 lo1

perfect, thanks for the help.