Suppressing countersunk holes

Suppressing countersunk holes

Anonymous
Not applicable
601 Views
2 Replies
Message 1 of 3

Suppressing countersunk holes

Anonymous
Not applicable

Hi!

 

I have an ilogic script which export my part to a STEP file. Which works great by the way. The problem is that when I order the parts, to be made by a laser cutter for example, the diameter of the coutersunk holes are lasered according to the largest diameter of the hole. Is there a way to suppress countersunk holes when exporting? Or even better, change them to a regular hole with the same diameter? I do the same with chamfer features and that works but I don't know how to separtate a normal hole from an countersunk hole.

 

Thanks in advance!

Below the ilogic rule I currently use for exporting the stp file 

'Set path
oJaar = "20" & Left(ThisDoc.FileName(False), 2)
oPath = "\\10.135.4.60\dxf-pdf\" & oJaar & "\" & Left(ThisDoc.FileName(False), 6) & "\" & Mid(ThisDoc.FileName(False), 7,3) & "\"

'Open document
curDoc = ThisDrawing.Sheet("sheet:1").View("VIEW1").ModelDocument
If curDoc.DocumentType = kPartDocumentObject Then
	oDoc = ThisApplication.Documents.Open(curDoc.FullFileName, True)
	oCompDef = oDoc.ComponentDefinition
		
'Supress all chamfers
Dim oEachF As PartFeature
'iterare each feature
For Each oEachF In oCompDef.Features
    'if it is a chamfer or fillet
    If TypeOf oEachF Is ChamferFeature Or TypeOf oEachF Is FilletFeature Then
        'suppress it
        oEachF.Suppressed = True
    End If
Next

' Get the STEP translator Add-In.
	Dim oSTEPTranslator As TranslatorAddIn
	oSTEPTranslator = ThisApplication.ApplicationAddIns.ItemById("{90AF7F40-0C01-11D5-8E83-0010B541CD80}")
	Dim oContext As TranslationContext
	oContext = ThisApplication.TransientObjects.CreateTranslationContext
	Dim oOptions As NameValueMap
	oOptions = ThisApplication.TransientObjects.CreateNameValueMap
			
		If oSTEPTranslator.HasSaveCopyAsOptions(ThisApplication.ActiveDocument, oContext, oOptions) Then
' Set application protocol.
			' 2 = AP 203 - Configuration Controlled Design
			' 3 = AP 214 - Automotive Design
			oOptions.Value("ApplicationProtocolType") = 3
' Other options...
			oOptions.Value("Author") = iProperties.Value("Summary", "Author")
			'oOptions.Value("Authorization") = ""
			oOptions.Value("Description") = iProperties.Value("Project", "Part Number") & " " & iProperties.Value("Project", "Description")
			oOptions.Value("Organization") = "Madolex-Somatech"
			oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
			Dim oData As DataMedium
			oData = ThisApplication.TransientObjects.CreateDataMedium
'Set the Step target file name with revision
'				If iProperties.Value("Project", "Revision Number") >"0" Then
'					oName= ThisDoc.FileName(False)& "-REV_" & iProperties.Value("Project", "Revision Number")
'				Else
'					oName =  ThisDoc.FileName(False) 
'				End If
'Set the Step target file name without revision	
			oName = ThisDoc.FileName(False) 
'Export Step
			oData.FileName = oPath & oName & ".stp"
			oPath2= oData.FileName
			oSTEPTranslator.SaveCopyAs(ThisApplication.ActiveDocument, oContext, oOptions, oData)
			
		End If
'Unsupress all chamfers
For Each oEachF In oCompDef.Features
    'if it is a chamfer or fillet
    If TypeOf oEachF Is ChamferFeature Or TypeOf oEachF Is FilletFeature Then
        'suppress it
        oEachF.Suppressed = False
    End If
Next

	ThisApplication.ActiveDocument.Close	
	End If
	

 

0 Likes
Accepted solutions (1)
602 Views
2 Replies
Replies (2)
Message 2 of 3

bradeneuropeArthur
Mentor
Mentor
Accepted solution

@Anonymous 

 

Solved with.....

https://forums.autodesk.com/t5/inventor-customization/suppress-countersunk-holes/td-p/8621279

I assume?

 

Regards,

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 3

Anonymous
Not applicable

Yes indeed! Thought some thing went wrong with this post, so I posted twice:P

0 Likes