Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I’m trying to use the .AddCustomContentCenterPart method in Visual Studio with the following libraries:
Imports System.IO Imports System.Runtime.InteropServices Imports System.Text.RegularExpressions Imports Autodesk.iLogic.Interfaces Imports Inventor Imports Autodesk.iLogic.Core
I’ve declared acomponents as IManagedComponents, but I’m unsure how to assign a value to it.
Here’s the function I’m using to create a component:
Private Function createComponent(ByVal name As String, ByVal length As Integer) As Object Return acomponents.AddCustomContentCenterPart(name, "Structural Shapes", "Frametek Tracks", {"PARTNUMBER", "PRC9019"}, {"Length", length}, partFolder:="", partFilename:=name + ".ipt", position:=Nothing, grounded:=False, visible:=True, appearance:=Nothing) End Function
In iLogic (within inventor), I can achieve this simply with:
Dim componentA = Components.AddCustomContentCenterPart("Test123", "Structural Shapes", "Frametek Tracks", {"PARTNUMBER","PRC9019"},{"Length", 500}, partFolder := saveAsPath, partFilename:= "Test123.ipt", position := Nothing, grounded := False, visible := True, appearance := Nothing)
How can I correctly assign a value to acomponents and use it in the createComponent function in Visual Studio?
Solved! Go to Solution.