JT Export settings

JT Export settings

Anonymous
Not applicable
2,542 Views
10 Replies
Message 1 of 11

JT Export settings

Anonymous
Not applicable

Hi. We have some problems exporting JT from Inventor when the assembly contains some  view representations.

Some parts are hidden and when we export to the JT format (but also Step and Pack&Go) they are displayed.

The only export format that can save the assembly "as viewed" on the screen are DWF and PDF (it has a specific option for this in the export window) but unfortunately we can not manage these extensions.

Is there a workaround to have a JT export "as viewed" in Inventor ?

 

0 Likes
2,543 Views
10 Replies
Replies (10)
Message 2 of 11

clutsa
Collaborator
Collaborator

I'm no expert in this but here's a start.

File>Export>CadFormat > "Save as Type: JT Files (*.jt)" > "Options..." > "Level Of Detail" > "Use Configuration File

 

This page has some info on setting the .cfg file.

http://support.ptc.com/help/creo/creo_pma/usascii/index.html#page/data_exchange/interface/Exporting_...

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 3 of 11

Anonymous
Not applicable

Hello.

I already tried that possibility by creating a file as suggested in the Inventor templates. The problem is not resolved.

0 Likes
Message 4 of 11

clutsa
Collaborator
Collaborator

OK. Do you still want the parts in the JT model but hidden or can anything hidden just be excluded from the JT model? In other words what do you use the JT model for? My idea is to make a rule to loop thru all your parts and anything that's hidden gets suppressed. Then it exports the JT model and then undoes everything back to the beginning of the macro so it's like your parts never were suppressed. I am willing to help write that code but need to know if that sounds like something you even want to try. 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 5 of 11

LukasZygmunt
Autodesk Support
Autodesk Support

Hi @Anonymous,

did you try to use options in export command? 

Screenshot_20.png

There are few options about Structure view, Try option ''Per_Part''.

And for export, its good to use the Level of Details (suppress those elements which you do not want export).

Let me know if this helps you.

Cheers

Lukasz

 

Lukasz Zygmunt
Technical Support Specialist
0 Likes
Message 6 of 11

Anonymous
Not applicable

It could be a good solution, could you give me an example to follow?

0 Likes
Message 7 of 11

Anonymous
Not applicable

even the export "per part" has the same problem

0 Likes
Message 8 of 11

LukasZygmunt
Autodesk Support
Autodesk Support

Hi @Anonymous,

Unfortunately, I can't reproduce your behaviour. Could you share the sample?

I understand that you want to hide some elements and rest of the files export via JT file. In results, you see that the hidden elements are also displayed.
Which version of Inventor do you use?

 

Thanks!

Lukasz

Lukasz Zygmunt
Technical Support Specialist
0 Likes
Message 9 of 11

clutsa
Collaborator
Collaborator
Dim app As Inventor.Application = ThisApplication
Dim doc As AssemblyDocument = app.ActiveDocument
Dim compDef As ComponentDefinition = doc.ComponentDefinition
Dim RepMgr As RepresentationsManager = CompDef.RepresentationsManager
Dim transMgr As TransactionManager = app.TransactionManager
Dim trans As Transaction = transMgr.StartTransaction(doc, "ExportJT")
newLod = RepMgr.LevelOfDetailRepresentations.Add()
newLod.Activate
For Each occ In compDef.Occurrences
	If occ.visible = False Then Component.IsActive(occ.Name) = False
Next
app.CommandManager.ControlDefinitions("AppFileExportCADFormatCmd").Execute2(False)
trans.End
app.CommandManager.ControlDefinitions("AppUndoCmd").Execute

Sorry if this posts twice. There was an error the first time and I don't think this posted.

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 10 of 11

Anonymous
Not applicable

Thank you clutsa for the code snippet.

I did some tests with Inventor macros... but i get right result only if I delete the object.

 

Private Sub setInv(co As Variant)
On Error Resume Next
 If co.Visible = False Then
     Dim co1 As ComponentOccurrence
     Set co1 = co
     co1.Delete
Else
    For Each occ In co.Definition.Occurrences
        setInv occ
    Next
End If


End Sub
Sub Prova()

Dim app As Inventor.Application
Set app = ThisApplication

Dim doc As AssemblyDocument
Set doc = app.ActiveDocument
Dim compDef As ComponentDefinition
Set compDef = doc.ComponentDefinition
Dim RepMgr As RepresentationsManager
Set RepMgr = compDef.RepresentationsManager
Dim transMgr As TransactionManager
Set transMgr = app.TransactionManager

Dim trans As Transaction
Set trans = transMgr.StartTransaction(doc, "ExportJT")
Set newLod = RepMgr.LevelOfDetailRepresentations.Add("SygestCustom")
newLod.Activate
For Each occ In compDef.Occurrences
    setInv occ
Next
app.CommandManager.ControlDefinitions("AppFileExportCADFormatCmd").Execute2 (True)
trans.End
app.CommandManager.ControlDefinitions("AppUndoCmd").Execute
End Sub

If from the context menu of Invetor I choose change the visibility I get a warning message as attached.

0 Likes
Message 11 of 11

clutsa
Collaborator
Collaborator

I assume that is an message about if the part needs to be associative (I took German for my foreign language in high school =p was that a mistake.) From that assumption and looking at your code I assume you're changing the visibility of a part that's in a sub assembly. The message is asking if you want to remove the associative option from the part. If you do then the part will only disappear in this assembly and the assembly will no longer check what the sub assembly looks like for other changes (color and part visibility, but will still update with component size changes and things like that.) If you take the top option then Inventor will hide the part in the actual sub assembly too (so it would be the same as if you opened the sub assembly and hide the part and came back to the main assembly.)

So yes it's a warning but not really a warning as much as a question in how you want to proceed. (Unless my assumptions are wrong and it really is a warning) I say go ahead and try the bottom option... if your assembly doesn't act how you like you can always turn the associative option back on under the representation menu.

 

Side note: I don't know how the sub assembly will like the "delete" but it might be fine since we are undoing everything when we're done. That transaction is tied to the main assembly so it might not undo the delete in the sub assembly (just pay attention to see if everything's right when you're done) You could also try

co1.Excluded = True 'ILO co1.Delete
If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes