|
copy properties to pdf file?
i'm trying to write a simple macros that we can create a pdf of a drawing that copies some of the file properties into the pdf.
the current pdf macro we use saves it as "filename"_rev_"revision".pdf and is sent to the appropriate directory. we then manually have to move the older rev out and into the archive folder
since we are in the process of implementing enterprise i found out we could keep it as one file now so we don't confuse purchasing with more than one rev in the folder (i'm guilty of that!). they don't care about which is the latest, just as long as they get it and we don't have to move files. the only thing is i'd like it to copy over the revision property for now (from there i should be able to do the rest).
what do i need to add? this is the current code (i still need to remove the rev part in the filename)
dim swapp, model as object
dim modname, newname, rev, fname as string
sub main()
set swapp = createobject("sldworks.application")
set model = swapp.activedoc
modname = model.gettitle
modname = left(modname, instr(1, modname, " ") - 1)
rev = model.custominfo("revision")
fname = modname + "_rev" + rev
pdf = "p:\pdm\02 - released\" + fname + ".pdf"
model.saveas2 pdf, 0, true, false
end sub
(btw, i'm just getting into this macro stuff...still waiting for a course to come up)
thanks,
jeff
find and install the dsofile library on ms's website. it can write custom properties.
quick |
|