I have a need to set several hundered idws to copy iprops from the shown model. Is there a way to automate this with ilogic/VBA? My primary goal is to copy the Rev number from the source ipt/iam to the idw.
My templates have been changed to do this by default, so my new files will work.
This line of iLogic code will copy the value of the revision number property in the model document (part or assembly, works for both) into the revision number property of the drawing:
iProperties.Value("Project", "Revision Number") = ThisDrawing.ModelDocument.PropertySets.Item("Summa
This code will only work in iLogic, not VBA.
As far as automating this, you could write a macro that cycles through all the drawings in a folder (are all your drawings in a single folder, or are they scattered about?), opens each one, runs the line of code, saves the drawing, closes it, then repeats.
Setting this up could be a bit of work, but I think it's possible.
Thanks for the code snippit. It worked well in my test of a file that I manually opened. I'll have to work on how to add it to a large set of existing files.
You may be able to create a custom task like in the following blog post.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.