Ilogic. Parts being pulled through with a form.

Ilogic. Parts being pulled through with a form.

kpulleyn
Observer Observer
215 Views
1 Reply
Message 1 of 2

Ilogic. Parts being pulled through with a form.

kpulleyn
Observer
Observer

Hi, looking for some help, 

Is it possible to pull a part into an assembly from vault using a drop down box on a form?

 

We are looking to pull from list of hundreds of a fans to place into an assembly.

 

Does anyone have an example of some ilogic code that might help us.

 

Thanks 

0 Likes
216 Views
1 Reply
Reply (1)
Message 2 of 2

TechInventor20
Advocate
Advocate

If you have you're fans in one place it is possible.

 

It would be like this.

 

You have 2 rules. the first one you can put in your ribbon.

Rule 1:

Dim FileLocation As System.IO.DirectoryInfo = _
New System.IO.DirectoryInfo("Your route")

Dim Extension As String = ".ipt"
Dim fi As System.IO.FileInfo() = FileLocation.GetFiles("*" & Extension)

Dim MyArrayList As New ArrayList

For Each oFile As System.IO.FileInfo In fi
	MyArrayList.Add(oFile.Name)
Next

MultiValue.List("d0") = MyArrayList

Parameter("d1") = ("Your route")
iLogicForm.Show("Form 2")

 

Rule 2:

Route = Parameter("d1")
Part = Parameter("d0") 

oPathandName = Route & Part

ThisApplication.CommandManager.PostPrivateEvent(PrivateEventTypeEnum.kFileNameEvent,oPathandName) 

ThisApplication.CommandManager.ControlDefinitions.Item("AssemblyPlaceComponentCmd").Execute

 

The form:

TechInventor20_0-1661839720533.png

 

 

0 Likes