Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

iLogic importing Content Center Parts with External Rule

Anonymous
424 Views
2 Replies
Message 1 of 3

iLogic importing Content Center Parts with External Rule

Anonymous
Not applicable

I have a local rule that successfully imports content center parts.  I want to make it an external rule so it can be updated to have more functionality in the future.  I have noticed that I cannot directly reference parameters from the external file, so I have replaced all parameters with a function that references the parameters.  For example.

 

NOZSCH

has been replaced with

 

 

Parameter("NOZSCH")

Now when I run my corrected code, it is not successfully finding the content center row in the external rule despite working in the local one.  Further, the error message that pops up shows no issues with the exact strings being used. See below.

 

troubleshooting.jpg

The lines I am using in this case are as follows.

Local Code:

 

Dim NozzlePath As String = "Tube & Pipe:Fittings:Flanges"
Dim NozzleFamily As String = "CL" & CLASS & " " & TYPE & " FLG " & NOZMAT
Dim ccDescription As String = "DESCRIPTION"
Dim NozzleDescription As String = SIZE & QUOT & " x CLASS " & CLASS & " " & NOZTYPE & " FLG SCH " & NOZSCH
Dim Nozzle As String = "N" & CURRENTNOZ
Dim componentA = Components.AddContentCenterPart(Nozzle, NozzlePath, NozzleFamily, {ccDescription,NozzleDescription}, position := Nothing, grounded := False, visible := True, appearance := Nothing)

 

 

External Code:

 

Dim NozzlePath As String = "Tube & Pipe:Fittings:Flanges"
Dim NozzleFamily As String = "CL" & Parameter("CLASS") & " " & Parameter("TYPE") & " FLG " & Parameter("NOZMAT")
Dim ccDescription As String = "DESCRIPTION"
Dim NozzleDescription As String = Parameter("SIZE") & Parameter("QUOT") & " x CLASS " & Parameter("CLASS") & " " & Parameter("NOZTYPE") & " FLG SCH " & Parameter("NOZSCH")
Dim Nozzle As String = "N" & CURRENTNOZ
Dim componentA = Components.AddContentCenterPart(Nozzle, NozzlePath, NozzleFamily, {ccDescription,NozzleDescription}, position := Nothing, grounded := False, visible := True, appearance := Nothing)

Is there some sort of reference I need to add to specify the content center when dealing with external code?

 

0 Likes
425 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

As an update, I have tried copying/pasting my external rule into a new local rule.  The copied external rule works as an internal rule.

Message 3 of 3

lena.talkhina
Alumni
Alumni

Hello @Anonymous  !

Great to see you here on Inventor Forum.

Did you find a solution?
If yes, please click on the "Accept as Solution" button as then also other community users can easily find and benefit from the information.
If not please don't hesitate to give an update here in your topic so all members know what ́s the progression on your question is and what might be helpful to achieve what you ́re looking for. 🙂

Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям! | Do you find the posts helpful? "LIKE" these posts!
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.



Лена Талхина/Lena Talkhina
Менеджер Сообщества - Русский/Community Manager - Russian

0 Likes