<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Betreff: [iLogic] Can't create a new folder on a server drive in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10372598#M125262</link>
    <description>&lt;P&gt;Thanks for the tip!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I think I stated before, aOrdreNr is a userparameter in my assembly file.&lt;/P&gt;&lt;P&gt;I use a form, as seen below, where I change userparameters, and update my assembly.&lt;/P&gt;&lt;P&gt;After which I'll make the .dxf files.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Unavngivet.png" style="width: 316px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/927766i07BBBF56D4ECEDDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unavngivet.png" alt="Unavngivet.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get that it doesn't look that pretty, but it's very efficient, as to I usually have an excel document, with linked&lt;/P&gt;&lt;P&gt;parameters, and I usually save my .dxf files manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont know if there's an easy way to make an input for iProperties in forms?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jun 2021 10:21:49 GMT</pubDate>
    <dc:creator>mhoE3YPJ</dc:creator>
    <dc:date>2021-06-08T10:21:49Z</dc:date>
    <item>
      <title>[iLogic] Can't create a new folder on a server drive</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10368280#M125225</link>
      <description>&lt;P&gt;I've been tweaking a .dxf export rule, and I've ran into a problem.&lt;/P&gt;&lt;P&gt;I can't create the folder on our server drive. Its a seperate server, and I'm pretty sure,&lt;/P&gt;&lt;P&gt;I have admin access.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing is that I can manually create a folder, with the right name, and then the files,&lt;/P&gt;&lt;P&gt;will be able to save to that folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variale&amp;nbsp;&lt;STRONG&gt;aOrdreNr&amp;nbsp;&lt;/STRONG&gt;is a userparameter, I have in my assembly. Its put as unitless.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to get around this problem?&lt;/P&gt;&lt;P&gt;Mind you, this works if I use the C: drive, as path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDoc As AssemblyDocument
oDoc = ThisApplication.ActiveDocument

If oDoc.DocumentType &amp;lt;&amp;gt; kAssemblyDocumentObject Then
    MessageBox.Show("Denne funktion SKAL køres i Assembly fil", "DABO")
    Exit Sub
End If

RUsure = MessageBox.Show ( _
"Denne funktion vil lave DXF Filer af alle dele i samlingen." _
&amp;amp; vbLf &amp;amp; " " _
&amp;amp; vbLf &amp;amp; "Sørg for at funktionen GEM ALLE SOM KOPI har kørt inden denne funktion." _
&amp;amp; vbLf &amp;amp; "Denne funktion kan tage tid. Din mappe bliver vist tilsidst.", "DABO Export DXF ",MessageBoxButtons.YesNo)
If RUsure = vbNo Then
    Return
 Else
End If


oPath = ("C:\Gulvsug\" &amp;amp; aOrdreNr &amp;amp; "\")

Dim oRefDocs As DocumentsEnumerator
Dim oRefDoc As Document
oRefDocs = oDoc.AllReferencedDocuments


For Each oRefDoc In oRefDocs
    Dim oCurFile As Document 'current file
    Try
        oCurFile = ThisApplication.Documents.Open(oRefDoc.FullFileName, False) 
            
     Catch
        GoTo NextIteration
    End Try
    
    If oCurFile.DocumentSubType.DocumentSubTypeID &amp;lt;&amp;gt; "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
         
        oCurFile.Close(True) 
    Else
        oCurFileName = oCurFile.FullFileName
    
        
        FNamePos = InStrRev(oCurFileName, "\", -1)
        
        FName = Right(oCurFileName, Len(oCurFileName) - FNamePos)
        
        FName = Left(FName, Len(FName) - 4)
        
        DxfName = oPath &amp;amp; aOrdreNr &amp;amp; "-" &amp;amp; aOrdrePre &amp;amp; " " &amp;amp; FName &amp;amp; ".dxf"

        Dim oSMCD As SheetMetalComponentDefinition = oCurFile.ComponentDefinition
        If Not oSMCD.HasFlatPattern Then 
            oSMCD.Unfold()
            oSMCD.FlatPattern.ExitEdit()
        End If

        
        Dim sOut As String = "FLAT PATTERN DXF?AcadVersion=2004" _
            + "&amp;amp;OuterProfileLayer=IV_INTERIOR_PROFILES" _
            + "&amp;amp;InvisibleLayers=IV_TANGENT;IV_FEATURE_PROFILES_DOWN;IV_BEND;IV_BEND_DOWN;IV_TOOL_CENTER;IV_TOOL_CENTER_DOWN;IV_ARC_CENTERS;IV_FEATURE_PROFILES;IV_FEATURE_PROFILES_DOWN;IV_ALTREP_FRONT;IV_ALTREP_BACK;IV_ROLL_TANGENT;IV_ROLL" _
            + "&amp;amp;SimplifySplines=True" _
            + "&amp;amp;BendLayerColor=255;255;0"
        Try
            oSMCD.DataIO.WriteDataToFile(sOut, DxfName) 
         Catch
        End Try

        oCurFile.Close(True)
    End If	
    NextIteration:
Next


MessageBox.Show("Alle DXF Filer exporteret til: " &amp;amp; vbLf &amp;amp; oPath &amp;amp; vbLf &amp;amp; vbLf &amp;amp; "Tjek venligst filerne, inden brug.", "DABO")


Shell("explorer.exe " &amp;amp; oPath,vbNormalFocus)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jun 2021 20:06:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10368280#M125225</guid>
      <dc:creator>mhoE3YPJ</dc:creator>
      <dc:date>2021-06-06T20:06:46Z</dc:date>
    </item>
    <item>
      <title>Betreff: [iLogic] Can't create a new folder on a server drive</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10370278#M125238</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't see any line where you create the directory. *???*&lt;/P&gt;&lt;P&gt;You can test if directory exist and create otherwise. If creation fails, you can exit your sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Dim sPath As String = "C:\Gulvsug\" &amp;amp; aOrdreNr &amp;amp; "\"
Dim oDirInfo As System.IO.DirectoryInfo

If Not System.IO.Directory.Exists(sPath) Then
	oDirInfo = System.IO.Directory.CreateDirectory(sPath)
	If oDirInfo Is Nothing Then
		MsgBox("Error creating Directory " &amp;amp; sPath, , "iLogic DXF-Export")
		Exit Sub
	End If
End If
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 07 Jun 2021 15:20:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10370278#M125238</guid>
      <dc:creator>Ralf_Krieg</dc:creator>
      <dc:date>2021-06-07T15:20:27Z</dc:date>
    </item>
    <item>
      <title>Betreff: [iLogic] Can't create a new folder on a server drive</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10371933#M125255</link>
      <description>&lt;P&gt;I got an error, from the line, where it pulls on the directoryInfo,&lt;/P&gt;&lt;P&gt;but insted I tweaked it a little and now it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If System.IO.Directory.Exists(oPath) = False Then
	System.IO.Directory.CreateDirectory(oPath)
ElseIf System.IO.Directory.Exists(oPath) = True Then
End If&lt;/LI-CODE&gt;&lt;P&gt;Thanks for the help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 05:10:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10371933#M125255</guid>
      <dc:creator>mhoE3YPJ</dc:creator>
      <dc:date>2021-06-08T05:10:31Z</dc:date>
    </item>
    <item>
      <title>Betreff: [iLogic] Can't create a new folder on a server drive</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10372576#M125261</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10334300"&gt;@mhoE3YPJ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I got an error, from the line, where it pulls on the directoryInfo,&lt;/P&gt;&lt;P&gt;but insted I tweaked it a little and now it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If System.IO.Directory.Exists(oPath) = False Then
	System.IO.Directory.CreateDirectory(oPath)
ElseIf System.IO.Directory.Exists(oPath) = True Then
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;You can save yourself some lines with this instead:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If System.IO.Directory.Exists(oPath) = False Then System.IO.Directory.CreateDirectory(oPath)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, where are to defining what aOrdreNr is?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Don't you need to have something like this before you define oPath?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;aOrdreNr = iProperties.value("Project","Stock Number")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 10:10:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10372576#M125261</guid>
      <dc:creator>ChristianAndersenIsmyname</dc:creator>
      <dc:date>2021-06-08T10:10:00Z</dc:date>
    </item>
    <item>
      <title>Betreff: [iLogic] Can't create a new folder on a server drive</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10372598#M125262</link>
      <description>&lt;P&gt;Thanks for the tip!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I think I stated before, aOrdreNr is a userparameter in my assembly file.&lt;/P&gt;&lt;P&gt;I use a form, as seen below, where I change userparameters, and update my assembly.&lt;/P&gt;&lt;P&gt;After which I'll make the .dxf files.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Unavngivet.png" style="width: 316px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/927766i07BBBF56D4ECEDDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unavngivet.png" alt="Unavngivet.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get that it doesn't look that pretty, but it's very efficient, as to I usually have an excel document, with linked&lt;/P&gt;&lt;P&gt;parameters, and I usually save my .dxf files manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont know if there's an easy way to make an input for iProperties in forms?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 10:21:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10372598#M125262</guid>
      <dc:creator>mhoE3YPJ</dc:creator>
      <dc:date>2021-06-08T10:21:49Z</dc:date>
    </item>
    <item>
      <title>Betreff: [iLogic] Can't create a new folder on a server drive</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10372620#M125264</link>
      <description>&lt;P&gt;Sorry, I missed that you stated it in your post &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For iProperties input: Is this what you're after?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristianAndersenIsmyname_0-1623148250632.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/927770iB5AF96B629035D7C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristianAndersenIsmyname_0-1623148250632.png" alt="ChristianAndersenIsmyname_0-1623148250632.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 10:31:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10372620#M125264</guid>
      <dc:creator>ChristianAndersenIsmyname</dc:creator>
      <dc:date>2021-06-08T10:31:09Z</dc:date>
    </item>
    <item>
      <title>Betreff: [iLogic] Can't create a new folder on a server drive</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10372646#M125265</link>
      <description>&lt;P&gt;Somehow I've completly missed that&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@1A5BF4DFF76C3208F100BEEBB3221CE2/emoticons/1f605.png" alt=":grinning_face_with_sweat:" title=":grinning_face_with_sweat:" /&gt;&lt;/P&gt;&lt;P&gt;I'm somewhat new to the whole iLogic department,&lt;/P&gt;&lt;P&gt;but I think if I use the iProperties, it'll make it look a lot more clean.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the nice idea! I'll update when I've added them &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@F982DDE76110C67DBDB6AF220B48480A/emoticons/1f604.png" alt=":grinning_face_with_smiling_eyes:" title=":grinning_face_with_smiling_eyes:" /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 10:46:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-can-t-create-a-new-folder-on-a-server-drive/m-p/10372646#M125265</guid>
      <dc:creator>mhoE3YPJ</dc:creator>
      <dc:date>2021-06-08T10:46:38Z</dc:date>
    </item>
  </channel>
</rss>

