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
745 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?

 

 

 

 

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

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

chandra.shekar.g
Autodesk Support
Autodesk Support
0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank you for the reply, I had found the custom property field ability and have made good use of it.  Especially as our content center wasn't originally set up with illogic in mind and column description do vary.

0 Likes