Dim oPartsList As PartsList Try oPartsList = oDrawDoc. ActiveDocument ' Set a reference to the first parts list on the active sheet. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication. ' This assumes a drawing document is active. V1: Version to handle single parts list on the active sheet - sSortColumnName = "KEYWORDS" ' Set a reference to the drawing document. Info( "Could not set sketch vis for: " & sName)Īlthough we can't accomplish this out of the box, here are 3 code examples to do this that use iLogic and some API calls. Info( "Could not set work point vis for: " & sName)Įnd Try Next For Each oItem In oDef. Info( "Could not set work axis vis for: " & sName)Įnd Try Next For Each oItem In oDef. Info( "Could not set work plane vis for: " & sName)Įnd Try Next For Each oItem In oDef. ComponentDefinition For Each oItem In oDef. ![]() Occurrences Call TraverseAssembly( oSubOccs)Įnd If Next End Sub Sub SetVis( oDoc As Document, sName As String)ĭim oDef As ComponentDefinition oDef = oDoc. DefinitionDocumentType = _ĭocumentTypeEnum. 'if sub assembly step into it's Occurrences collection If oOcc. ![]() Name 'set vis in the component Call SetVis( oOcc. Document Dim sName As String sName = oOcc. DisplayName 'set vis in the top level Call SetVis( oDoc, sName)Įnd Sub Sub TraverseAssembly( oOccs As ComponentOccurrences)ĭim oOcc As ComponentOccurrence For Each oOcc In oOccs Dim oDoc As Document oDoc = oOcc. ![]() Occurrences Dim sName As String sName = oDoc. ActiveDocument Dim oOccs As ComponentOccurrences = oDoc. Sub Main Dim oDoc As AssemblyDocument = ThisApplication. You can use this example iLogic rule to traverse the assembly (and subassemblies) to turn off all work features and sketches.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |