Message 1 of 9
Use Template to add Document gives Style conflict
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I want to add a new assembly based on our Template. I've tried all the below codes. However I keep getting a style conflict but I don't get this when I manually add a new assembly myself.
What could be the problem here and how can I fix it?
Thanks in advance!
oAssDoc = oApp.Documents.Add(Inventor.DocumentTypeEnum.kAssemblyDocumentObject, oApp.FileManager.GetTemplateFile(Inventor.DocumentTypeEnum.kAssemblyDocumentObject))
or
oAssDoc = oApp.Documents.Add(Inventor.DocumentTypeEnum.kAssemblyDocumentObject, oApp.DesignProjectManager.DesignProjects.ItemByName("Vault").TemplatesPath & "\Standard.iam", True)
or
oAssDoc = oApp.Documents.Add(Inventor.DocumentTypeEnum.kAssemblyDocumentObject, oApp.DesignProjectManager.ActiveDesignProject.TemplatesPath & "\Standard.iam", True)