File Path Length Issue

File Path Length Issue

amitnkukanur
Collaborator Collaborator
459 Views
3 Replies
Message 1 of 4

File Path Length Issue

amitnkukanur
Collaborator
Collaborator

Hello to All,

 

We are doing a customization in Inventor using VB.net as development language. Currently the problem We are facing is of length in Filepath.

 

A customer requests : File path is about 260-300 characters long and in such cases inventor is not allowing to store details in iProperties and even customization is failing. 

 

127 Characters are allowed to be stored in Inventor iProperties, but if the file path is from 260-300 characters long our Inventor won't allow to store values in iproperty name details.

 

What should we do in such cases? If there is any work around if yes, please suggest us

 

 

rgds

Amit

 

 

Senior Software Engineer
0 Likes
460 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

I would try to write down path in 3 iProperties. path = path1 & path2 & path3. on the end you cad add some sequence to make sur you have whole path.

maybe it's not very sophisticated idea but it sure will work.

0 Likes
Message 3 of 4

ekinsb
Alumni
Alumni

What you're seeing is some kind of weird behavior of the iProperties dialog.  iProperties themselves are not limited.  Below is a sample program that creates an iProperty with a string of 350 characters.  If I look at this property in the dialog it shows me all 350 characters but if I try to make an edit then it truncates it to the shorter string.  It's an artificial limitation of the iProperty dialog.  I don't know enough about your workflow to be able to suggest the best alternatives, but primarily you'll want to create the iProperty using the API. 

 

Public Sub AddProp()
    Dim doc As Document
    Set doc = ThisApplication.ActiveDocument
    
    Dim propSet As PropertySet
    Set propSet = doc.PropertySets.Item("Inventor User Defined Properties")
    
    Dim longString As String
    longString = "1234567890123456789012345678901234567890123456*50*"
    longString = longString & "123456789012345678901234567890123456789012345*100*"
    longString = longString & "123456789012345678901234567890123456789012345*150*"
    longString = longString & "123456789012345678901234567890123456789012345*200*"
    longString = longString & "123456789012345678901234567890123456789012345*250*"
    longString = longString & "123456789012345678901234567890123456789012345*300*"
    longString = longString & "123456789012345678901234567890123456789012345*350*"
    
    Dim prop As Property
    Set prop = propSet.Add(longString, "Test Long String")
    
    Dim testVal As String
    testVal = prop.Value
    
    Debug.Print testVal
End Sub

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 4 of 4

amitnkukanur
Collaborator
Collaborator

Ok Will try

Senior Software Engineer
0 Likes