Add To - Frequently Used Subfolders - Collection - Manufacturing DevBlog
Add To - Frequently Used Subfolders - Collection - Manufacturing DevBlog
Manufacturing DevBlog
(http://adndevblog.typepad.com
/manufacturing/)
The resource for software developers working with Design, Lifecycle and Simulation
technologies from Autodesk.
11/28/2016
(http://adndevblog.typepad.com
1 de 6
20/01/2017 20:42
/.a/6a0167607c2431970b01b8d23ede74970c-popup)
2 de 6
20/01/2017 20:42
Sub AddFrequentlyUsedSubfolder()
Dim oProjectManager As DesignProjectManager
Set oProjectManager = ThisApplication.Design
ProjectManager
Dim oProject As DesignProject
Set oProject = oProjectManager.ActiveDesignP
roject
' Use 'Microsoft XML, v6.0'
Dim xmlDoc As DOMDocument60
Set xmlDoc = New DOMDocument60
xmlDoc.async = False
Dim strProjectPath As String
strProjectPath = oProject.FullFileName
' Load the project file (*.ipj)
Call xmlDoc.Load(strProjectPath)
' Select the node
Dim xmlProjectPaths As IXMLDOMNode
Call xmlDoc.setProperty("SelectionLanguage",
"XPath")
Set xmlProjectPaths = xmlDoc.selectSingleNod
e("/InventorProject/ProjectPaths")
' Add the new subfolder
' We need to add something like this:
' <ProjectPath pathtype="FrequentlyUsedFolde
r">
'
<PathName>MyFolder</PathName>
'
<Path>Workspace\MySubfolder</Path>
' </ProjectPath>
Dim xmlProjectPath As IXMLDOMNode
Set xmlProjectPath = xmlDoc.createNode(1, "P
rojectPath", "")
Dim xmlPathType As IXMLDOMAttribute
Set xmlPathType = xmlDoc.createAttribute("pa
thtype")
xmlPathType.value = "FrequentlyUsedFolder"
Call xmlProjectPath.Attributes.setNamedItem(
xmlPathType)
3 de 6
20/01/2017 20:42
4 de 6
20/01/2017 20:42
(http://adndevblog.typepad.com
/.a/6a0167607c2431970b01b7c8b513dc970b-popup)
(https://plus.google.com
/share?url=http://adndevblog.typepad.com/manufacturing/2016/11/add-tofrequently-used-subfolders-collection.html)
(http://www.facebook.com
/sharer.php?u=http%3A%2F
%2Fadndevblog.typepad.com%2Fmanufacturing%2F2016%2F11%2Faddto-frequently-used-subfolders-collection.html)
Comments
Comment below or sign in with
Typepad (http://www.typepad.com
/sitelogin?uri=http%3A%2F
%2Fadndevblog.typepad.com%2Fmanufacturing%2F2016%2F11%2Faddto-frequently-used-subfolders-collection.html&
fp=0a6450a82b0c18ea3ea2206fe00df700&view_uri=http%3A%2F
%2Fprofile.typepad.com%2F&via=blogside&post_uri=http:
//adndevblog.typepad.com/manufacturing/2016/11/add-to-frequentlyused-subfolders-collection.html)
Facebook (http://www.typepad.com
/sitelogin?uri=http%3A%2F
%2Fadndevblog.typepad.com%2Fmanufacturing%2F2016%2F11%2Faddto-frequently-used-subfolders-collection.html&
fp=0a6450a82b0c18ea3ea2206fe00df700&view_uri=http%3A%2F
%2Fprofile.typepad.com%2F&via=blogside&service=facebook&post_uri=http:
//adndevblog.typepad.com/manufacturing/2016/11/add-to-frequentlyused-subfolders-collection.html)
Twitter (http://www.typepad.com
/sitelogin?uri=http%3A%2F
%2Fadndevblog.typepad.com%2Fmanufacturing%2F2016%2F11%2Faddto-frequently-used-subfolders-collection.html&
fp=0a6450a82b0c18ea3ea2206fe00df700&view_uri=http%3A%2F
%2Fprofile.typepad.com%2F&via=blogside&service=twitter&post_uri=http:
//adndevblog.typepad.com/manufacturing/2016/11/add-to-frequentlyused-subfolders-collection.html)
Google+ (http://www.typepad.com
/sitelogin?uri=http%3A%2F
%2Fadndevblog.typepad.com%2Fmanufacturing%2F2016%2F11%2Faddto-frequently-used-subfolders-collection.html&
fp=0a6450a82b0c18ea3ea2206fe00df700&view_uri=http%3A%2F
%2Fprofile.typepad.com%2F&via=blogside&service=gplus&post_uri=http:
//adndevblog.typepad.com/manufacturing/2016/11/add-to-frequently-
5 de 6
20/01/2017 20:42
(http://www.typepad.com/)
Manufacturing DevBlog (http://adndevblog.typepad.com/manufacturing/)
6 de 6
20/01/2017 20:42