place and replace content center parts using ilogic and forms

place and replace content center parts using ilogic and forms

Anonymous
Not applicable
2,142 Views
4 Replies
Message 1 of 5

place and replace content center parts using ilogic and forms

Anonymous
Not applicable

Hello everyone,

I am creating a support structure to mount pipes on.
This support consists of standart parts like I-beams and can be edited using a form. So pofile type, lengths and mounting can be chosen.
The support is an "L" shape.
So on the horizontal beam I want to place brackets  to mount those pipes in. these brackets exist as custom parts in our content center.
my question is.
Does a code exist to create a list in a form to chose a bracket from the contentlibrary or shout I recreate them as iParts?

Feel free to ask for more information if the situation is not clear.
Thank you in advance!

 

Lennart

 

This is the support structure.This is the support structure.this is one of the brackets to choose from in our contentcenter.this is one of the brackets to choose from in our contentcenter.

0 Likes
Accepted solutions (1)
2,143 Views
4 Replies
Replies (4)
Message 2 of 5

FINET_Laurent
Advisor
Advisor

You could create a multivalue text parameter and set the different .ipt files to be imported.

Then on your form you could make a button to add / remove the bracket using:

Components.Add("BracketName",FileNameParameter)
Components.Delete("BracketName")

 I whould procede this way..

 

Have a nice day,

 

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Message 3 of 5

J-Camper
Advisor
Advisor

If they are all located in the same folder, you could use something like this:

Dim fPath As String = ThisDoc.Path 'For testing puposes. Change to your folder location
Dim fNames() As String = System.IO.Directory.GetFiles(fPath, "*.ipt")
Dim fNameList As New List(Of String) 
For Each n As String In fNames
	fNameList.Add(n.Remove(0,n.LastIndexOf("\")+1))
Next
Dim Selection As String = InputListBox("Prompt", fNameList, fNameList.Item(1), Title := "Title", ListName := "File Name List")
Dim SelectedFilePath As String = fNames(fNameList.IndexOf(Selection))
MessageBox.Show(SelectedFilePath, "Selected File Path")

 

 

0 Likes
Message 4 of 5

dutt.thakar
Collaborator
Collaborator
Accepted solution

@Anonymous 

 

Check out this snippet : Components.AddContentCenterPart

 

This is explicitly used for adding content center library parts using iLogic. See the snap shot, attached also, try to understand what inputs are required when you use this snippet.

 

Please accept this as solution, if this has answered your question.

 

Regards,

Dutt Thakar

If this answer has solved your problem please ACCEPT SOLUTION and hit like if you found it helpful..!


Regards,
Dutt Thakar
LinkedIn
0 Likes
Message 5 of 5

Anonymous
Not applicable

it worked! 

Thank you and have a nice day!

0 Likes