Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

@mat_hijs , I think I might have figured it out. If I add a line to specify the CC language in the function then it works without error in the Internal and External rules.

 

For me the language syntax is en-US

 

Public Class Glassteun
	Public Property Category As String = "Fasteners:Nuts:Hex"
	Public Property Name As String
	Public Property Number As String
	Public Property Visible As Boolean
	Public Property Components As IManagedComponents
	Public Property Component As ICadComponent
	
	Public Sub New(Components As IManagedComponents, Component As ICadComponent)
		Me.Components = Components
		Me.Component = Component
	End Sub
	
	Public Function Place() As Inventor.ComponentOccurrence
		Components.ContentCenterLanguage = "en-US"
		Dim oOcc As Inventor.ComponentOccurrence
		'*****This is a workaround for a bug, see this forum post: https://forums.autodesk.com/t5/inventor-programming-ilogic/place-content-center-bug/td-p/12727134*****
		'****************************************************************************************************************************************************************
		Try
			If Name <> "" Then Component.Visible(Name) = True
		Catch
		End Try
		'****************************************************************************************************************************************************************
		'****************************************************************************************************************************************************************
		If Name = "" Then Name = "TempName"
		Components.AddContentCenterPart(Name, Category, Number, Number, , False, , )
		Component.Visible(Name) = Visible
		oOcc = Component.InventorComponent(Name)
		If Name = "TempName" Then oOcc.Name = ""
			
		Return oOcc
	End Function
End Class