Hello everyone,
I have a question about Inventor Drawing and Model.
I create a custom drawing template and some custom model which whenever I need them I grab them from the library and re-save them as I design new products. I’m working on a shared server and I don’t want someone else to look at some logic I used. So I need to protect my templates and model.
So if someone knows how to create read-only drawing and model, it would be much appreciated to let me know how to do it.
Thanks.
Nothing currently that will "lock" the way you can with Word and Excel documents within Inventor. Short of keeping the files within your security of a local removable drive that you can take with you.
You might be able to change the security of the files for your permission only within Windows but I don't think that's what you want.
RMB on the file, pull up the properties (not iProperties) and look at the permissions and security.
Hi Arya2012,
You might consider saving your model as a custom template file (you can use the Save Copy As Template button). If you place you iLogic in an external rule, and set the Event Trigger in the template file for the new file event, then the rule will trigger when a new file is created.
The drawing is a big trickier, but you can create a drawing of each of your template parts that is fully detailed and use the Replace Model Reference tool to swap out the template model file with the new configuration. This can be done manualy or programatically. The tricky part is that the drawing can't be used as an Inventor template.
Custom templates and tabs
iLogic opens when a new file is created:
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Hi Curtis,
Could you show me in more details how to do the drawings please?
Hi Arya2012,
If you create a subfolder in your templates folder it will not show up in the Inventor New File dialog box. For instance the folder called Drawing Templates shown here, will not show up for the user to select from.
My drawing "template" is a fully dimensioned drawing of my part template:
So then I would create a bit of ilogic code to configure and create a copy of the part template and the drawing template, and then I'd use ReplaceReference to change the new drawing so that it looks at the new part file, rather than the part file template.
Some adjustment is then needed to rearange dims and views if the part has become much longer, etc.
Here is a real quick example, I would run this as an external rule, so that no ilogic remains in the files:
'create a list of sizes
myStringValues = new string(){"30", "40", "42", "44", "46", "48", "50", "52", "*Custom Size*"}
'get user input
myLength = InputListBox("Select a Length", MyStringValues, MyStringValues(0), _
"22-R2 with K Unit Cutout Configuration", "iLogic")
'set the part size
If myLength = "*Custom Size*" Then
Parameter("d1") = InputBox("Enter a custom Length", "iLogic", Parameter("d1"))
Else
Parameter("d1") = myLength
End If
'set the part number
iProperties.Value("Project", "Part Number") = "22-R2-K-" & Parameter("d1")
'create the new part name
newPart = "U:\Engineering\CAD Files\Counter Tops\" & _
iProperties.Value("Project", "Part Number") & ".ipt"
'create the new drawing name
newIDW = "U:\Engineering\CAD Files\Counter Tops\" & _
iProperties.Value("Project", "Part Number") & ".idw"
'define the drawing template location
IDWtemplate = _
"U:\Engineering\Templates\01-Counter Tops\Drawing Templates\22-R2 with K Unit Cutout.idw"
'copy the drawing template to create the new drawing
FileCopy (IDWtemplate, newIDW)
'update the part file
InventorVb.DocumentUpdate()
'zoom all
ThisApplication.ActiveView.Fit
'save the part file
ThisDoc.Document.SaveAs(newPart, False)
'open the new drawing file
Dim doc as Document
doc = ThisApplication.Documents.Open(newIDW, True)
'update the referenced model in the drawing
Dim oFD As FileDescriptor
oFD = doc.ReferencedFileDescriptors(1).DocumentDescriptor.ReferencedFileDescriptor
oFD.ReplaceReference(ThisDoc.Document.FullFileName)
doc.Update()
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Hi Curtis,
This is wonderful, but I still need to lock my drawing.
Let's explain it a little in details. When I finish a project which includes assemblies, weldments, parts and drawings of each, then I place it in the server. This is for me or someone else in my department to come back to it if we have the same order again. Now I don’t want someone else to look at detail of my custom templates. So basically I want them to look at the drawing without changing anything or looking into deeper details. Is it possiable to lock the details of your template or any other way that you know to do the same thing?
Thanks and really appreciated for your help.