Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IFRs on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parasolid export journal code error

Status
Not open for further replies.

rafl

Mechanical
May 30, 2011
41
Hi

In Link theres a parasolid export journal by cowski.
It gives me an error message when file name contains more than 30 characters. Error in line 39
Any help would be appreciated
 
Replies continue below

Recommended for you

Replace this block of code:

Code:
[COLOR=blue]For each[/color] obj [COLOR=blue]as[/color] Body [COLOR=blue]in[/color] mySelectedObjects  
    [COLOR=blue]if[/color] obj.IsOccurrence [COLOR=blue]then[/color]  
        obj.SetName(obj.OwningComponent.DisplayName)  
    [COLOR=blue]else[/color]  
[highlight #FCE94F]        obj.SetName(obj.OwningPart.Leaf)[/highlight]  
    end [COLOR=blue]if[/color]  
    tags.Add(obj.Tag)  
[COLOR=blue]Next[/color]

with the following block of code, and it will truncate long names.

Code:
[COLOR=blue]For Each[/color] obj [COLOR=blue]As[/color] Body [COLOR=blue]In[/color] mySelectedObjects  
    [COLOR=blue]If[/color] obj.IsOccurrence [COLOR=blue]Then[/color]  
        obj.SetName(obj.OwningComponent.DisplayName)  
    [COLOR=blue]Else[/color]  
[highlight #FCE94F]        [COLOR=blue]If[/color] obj.OwningPart.Leaf.Length > 30 [COLOR=blue]Then[/color]  
            obj.SetName(obj.OwningPart.Leaf.Substring(0, 30))  
        [COLOR=blue]Else[/color]  
            obj.SetName(obj.OwningPart.Leaf)  
        End [COLOR=blue]If[/color][/highlight]  
    End [COLOR=blue]If[/color]  
    tags.Add(obj.Tag)  
[COLOR=blue]Next[/color]


www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor