Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Export to SAT without 2D Data (face/surface)

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
josh.nieman
409 Views, 4 Replies

Export to SAT without 2D Data (face/surface)

Is there any way to export a .SAT file such that 2d data does not go with it - only solids? 

Explanation:  We have parts we routinely model by the 'sculpt' or 'split' solid commands.


This gives us the solid model that we create our part from.  However, the original multi-face 2d surface remains along with the solid model. 


When exporting a .SAT file, this 2D surface rides along and shows up in the .SAT model which is undesired.

Is there any way to export a .SAT file such that 2d data does not go with it - only solids?  Currently I'm basically using the supplied API samples for translators:
(VB.NET)

            ' Get the SAT translator Add-In.
            Dim oSATTranslator As TranslatorAddIn
            oSATTranslator = InvApp.ApplicationAddIns.ItemById("{89162634-02B6-11D5-8E80-0010B541CD80}")
            If oSATTranslator Is Nothing Then
                MsgBox("Could not access SAT translator.")
                Exit Sub
            End If

            If oSATTranslator.HasSaveCopyAsOptions(InvApp.ActiveDocument, oContext, oOptions) Then
                oDataMedium.FileName = ExpDir & asmfilename & ".sat"
                Call oSATTranslator.SaveCopyAs(InvApp.ActiveDocument, oContext, oOptions, oDataMedium)
            End If
4 REPLIES 4
Message 2 of 5
josh.nieman
in reply to: josh.nieman

I have looked through the properties of both the TranslatorAddIn object and DataMedium object, but can't really find any way to control this type of data directly.

Any help would be greatly appreciated.

Message 3 of 5

@josh.nieman ,

 

Is it possible to export SAT without 2D data through UI or manually? Are there any differences between UI and API SAT file?

 

Thanks and regards,

 


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 4 of 5

@chandra.shekar.g  Good question.  I have not found a way to export without 2D data through UI, no.

I think I should begin with some context.

Our process is to export large assemblies that can have from 20 to 1200 reference documents of parts and subassemblies.  I currently have a program that isolates selected parts individually, and exports that as a .SAT model.  We use that model for inspection of Critical Features with our CMM.

 

Occasionally 2D surfaces in a part model will have their visibility left on, which means our automation for exporting SAT models exports it with the rest.  Typically, it is because the designer has turned "Construction Surfaces" off in their Object Visibility settings (via Ribbon tab) which doesn't appear to affect what is exported.

 

I would like to avoid adding a method to my automation which looks for 2D surfaces and turns their visibility off, because I fear it'd slow it down for a semi-rare case.  If the 2D surface has Visibility Off in the part model, it does not export.

I was hoping this was something that could be handled in the SAT translator which would work as a "catch-all" solution without overhead.


Any thoughts or ideas?

Message 5 of 5
josh.nieman
in reply to: josh.nieman

In hindsight I guess it wasn't that bad to go and turn off those surfaces anyway.  Ran it on a couple widely varying assemblies and it was inconsequential.

For reference, I have all Occurrences in the ActiveDocument (assembly) visibility turned off via the .HideAll method of the View.  Then I create a collection of Occurrences to turn visible.  Since it's already weeded down to just those ComponentOccurrence objects, it's not really running much.  Here's the code I am starting with, which does what I want.

 

            For Each occ In showme
                Try
'Debug.Print(occ.Name & " " & occ.Definition.Type) Dim occdef As PartComponentDefinition = occ.Definition
'Debug.Print(occdef.WorkSurfaces.Count) If occdef.WorkSurfaces.Count <> 0 Then
Dim surfs = occdef.WorkSurfaces For Each surf As WorkSurface In surfs surf.Visible = False Next End If Catch ex As Exception Debug.Print("couldn't pass occ doc as partdoc probably") End Try occ.Visible = True '------------- <does other stuff, too> Next

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report