Nastran In-CAD ilogic External Rule for assemblies

dseiler35
Participant
Participant

Nastran In-CAD ilogic External Rule for assemblies

dseiler35
Participant
Participant

Hello guys,

I only became familiar with the ilogic approach at the end of last year, but since then I have already achieved a great deal. 

Now I am stuck with a problem that I would like to set up a FE analysis of ilogic for an assembly in order to fill it with different load cases.

So far I have tried it with a part and there have been no problems with the construction, calculation and analysis. 

However, as soon as I use an assembly I cannot even execute the external rule through the main rule.

 

Problem with the main rule: 

 

"Error as a rule: IlogicExtRule_EnterInCADEnv in Document: XXX.iam

Member not found. (Exemption from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))"

 

I have used the following as the main rule:

Sub Main()
	Dim oIlogic As IiLogicAutomation
	oIlogic = iLogicVb.Automation
	
	' Setting iLogic External Rules directory to In-CAD's iLogic external rules folder
	Dim ExternalRuleDirectory(0) As String
	ExternalRuleDirectory(0) = "C:\Program Files\Autodesk\Nastran 2019\In-CAD\System\iLogic"
	oIlogic.FileOptions.ExternalRuleDirectories = ExternalRuleDirectory
	iLogicVb.RunExternalRule("IlogicExtRule_EnterInCADEnv")
	
	' Setting iLogic Addin DLLs directory to In-CAD's System folder
	oIlogic.FileOptions.AddinDirectory = "C:\Program Files\Autodesk\Nastran 2019\In-CAD\System"
		
End Sub

 

Could somebody give me some help, what could be the reason for this or how I can get this to work with an assembly?

Thanks in advance!

 

Daniel 

 

PS: I am using 

Autodesk Inventor Professional 2019

64-Bit-Edition

Build: 330, Release: 2019.4.4 

0 Likes
Reply
944 Views
7 Replies
Replies (7)

Roelof.Feijen
Advisor
Advisor

Hi @dseiler35 ,

 

What the main rules does is make changes to the iLogic Configuration.

It tells Inventor where to find Nastran DLL's and External Rules.

I assume that in your case Nastran is installed at C:\Program Files\Autodesk\Nastran 2019?

 

On the Tools tab, click the arrow to expand the Options menu.
Click iLogic Configuration and check your settings. It should look like this:

2020-02-03 10_07_09-Window.png

Otherwise provide the iLogic Rule you have written.

Roelof Feijen

If my post answers your question, please click the "Accept Solution" button. This helps everyone find answers more quickly!

dseiler35
Participant
Participant

Hello Roelof.Feijen,

 

thank you for your fast response.

Your settings look exactly as mine do. This is also what I checked first.

 

The thing is the error occurs when I am running the main rule, which does not happen in part environment. 

When I run my written rule this error occurs:

 

german:

Fehler in Regel: Lastbeaufschlagung in Dokument: W_1234_TESTING.iam

Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.

 

english:

Error in rule: Lastbeaufschlagung in Dokument: W_1234_TESTING.iam

An attempt was made to read or write to the protected memory. This is often an indication that other memory is damaged.

 

This is my rule I want to execute:

 

AddReference "NINIlogic"

'Zugriff auf externe Regel
Sub Main() iLogicVb.RunExternalRule("IlogicExtRule_EnterInCADEnv") Dim AddinObj As New NINIlogic.InCadAddin Dim strCmdForLoad, strCmdSubcase As String 'Subcase 1 strCmdSubcase1 = "<NewSubcase Name=""Subcase 1 "" ID="" 1 "" AnalysisID=""1"" IncludedLoads=""101;102;103;104;105;106;107;108;109;110;111;112;113;114;115;116;117;118;119;120;121;122;123;124;125;126;127;128;129;130;131;132;133;134;135;136;137;138;139;140"" IncludedConstraints=""1"" ComponentName="" Stab ""/></Subcase>" 'Kräfte und Momente strCmdForLoad101 = "<Load Name=""Last 101 "" ID="" 101 "" Type=""0"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""5"" Direction=""0"" CoordinateSystemID="" 9 "" Display=""1"" Fx="" 197,13 "" Fy="" -1360,13 "" Fz="" 0,00 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity1 GeometryType=""0"" GeometryID="" 1 "" ComponentName="" Stab ""/></Load>" strCmdForLoad102 = "<Load Name=""Last 102 "" ID="" 102 "" Type=""0"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""5"" Direction=""0"" CoordinateSystemID="" 10 "" Display=""1"" Fx="" 197,13 "" Fy="" -1360,13 "" Fz="" 0,00 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity2 GeometryType=""0"" GeometryID="" 2 "" ComponentName="" Stab ""/></Load>" strCmdForLoad103 = "<Load Name=""Last 103 "" ID="" 103 "" Type=""0"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""5"" Direction=""0"" CoordinateSystemID="" 11 "" Display=""1"" Fx="" -438,45 "" Fy="" 1360,13 "" Fz="" 5636,13 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity3 GeometryType=""0"" GeometryID="" 3 "" ComponentName="" Stab ""/></Load>" strCmdForLoad104 = "<Load Name=""Last 104 "" ID="" 104 "" Type=""0"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""5"" Direction=""0"" CoordinateSystemID="" 12 "" Display=""1"" Fx="" -438,45 "" Fy="" 1360,13 "" Fz="" -5636,57 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity4 GeometryType=""0"" GeometryID="" 4 "" ComponentName="" Stab ""/></Load>" strCmdForLoad105 = "<Load Name=""Last 105 "" ID="" 105 "" Type=""0"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""5"" Direction=""0"" CoordinateSystemID="" 13 "" Display=""1"" Fx="" 0,00 "" Fy="" 0,00 "" Fz="" 7789,53 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity5 GeometryType=""0"" GeometryID="" 5 "" ComponentName="" Stab ""/></Load>" strCmdForLoad106 = "<Load Name=""Last 106 "" ID="" 106 "" Type=""0"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""5"" Direction=""0"" CoordinateSystemID="" 14 "" Display=""1"" Fx="" 0,00 "" Fy="" 0,00 "" Fz="" -7789,53 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity6 GeometryType=""0"" GeometryID="" 6 "" ComponentName="" Stab ""/></Load>" strCmdForLoad107 = "<Load Name=""Last 107 "" ID="" 107 "" Type=""0"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""5"" Direction=""0"" CoordinateSystemID="" 15 "" Display=""1"" Fx="" 0,00 "" Fy="" 241,32 "" Fz="" 2152,96 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity7 GeometryType=""0"" GeometryID="" 7 "" ComponentName="" Stab ""/></Load>" strCmdForLoad108 = "<Load Name=""Last 108 "" ID="" 108 "" Type=""0"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""5"" Direction=""0"" CoordinateSystemID="" 16 "" Display=""1"" Fx="" 0,00 "" Fy="" -241,32 "" Fz="" 2152,96 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity8 GeometryType=""0"" GeometryID="" 8 "" ComponentName="" Stab ""/></Load>" strCmdForLoad121 = "<Load Name=""Last 121 "" ID="" 121 "" Type=""1"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""4"" Direction=""0"" CoordinateSystemID="" 9 "" Display=""1"" Mx="" 759650,45 "" My="" -33344,79 "" Mz="" -19453,45 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity1 GeometryType=""0"" GeometryID="" 1 "" ComponentName="" Stab ""/></Load>" strCmdForLoad122 = "<Load Name=""Last 122 "" ID="" 122 "" Type=""1"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""4"" Direction=""0"" CoordinateSystemID="" 10 "" Display=""1"" Mx="" -759651,61 "" My="" 33344,83 "" Mz="" -19453,43 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity2 GeometryType=""0"" GeometryID="" 2 "" ComponentName="" Stab ""/></Load>" strCmdForLoad123 = "<Load Name=""Last 123 "" ID="" 123 "" Type=""1"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""4"" Direction=""0"" CoordinateSystemID="" 11 "" Display=""1"" Mx="" 0,00 "" My="" 732974,24 "" Mz="" -160105,59 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity3 GeometryType=""0"" GeometryID="" 3 "" ComponentName="" Stab ""/></Load>" strCmdForLoad124 = "<Load Name=""Last 124 "" ID="" 124 "" Type=""1"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""4"" Direction=""0"" CoordinateSystemID="" 12 "" Display=""1"" Mx="" 0,00 "" My="" -732974,24 "" Mz="" -160105,61 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity4 GeometryType=""0"" GeometryID="" 4 "" ComponentName="" Stab ""/></Load>" strCmdForLoad125 = "<Load Name=""Last 125 "" ID="" 125 "" Type=""1"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""4"" Direction=""0"" CoordinateSystemID="" 13 "" Display=""1"" Mx="" 0,00 "" My="" 0,00 "" Mz="" 0,00 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity5 GeometryType=""0"" GeometryID="" 5 "" ComponentName="" Stab ""/></Load>" strCmdForLoad126 = "<Load Name=""Last 126 "" ID="" 126 "" Type=""1"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""4"" Direction=""0"" CoordinateSystemID="" 14 "" Display=""1"" Mx="" 0,00 "" My="" 0,00 "" Mz="" 0,00 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity6 GeometryType=""0"" GeometryID="" 6 "" ComponentName="" Stab ""/></Load>" strCmdForLoad127 = "<Load Name=""Last 127 "" ID="" 127 "" Type=""1"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""4"" Direction=""0"" CoordinateSystemID="" 15 "" Display=""1"" Mx="" -2399,33 "" My="" 0,00 "" Mz="" -3655,38 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity7 GeometryType=""0"" GeometryID="" 7 "" ComponentName="" Stab ""/></Load>" strCmdForLoad128 = "<Load Name=""Last 128 "" ID="" 128 "" Type=""1"" SubType=""0"" EntitiesCount=""1"" Subcases=""1"" ArrowLength=""50"" ArrowColor=""65280"" DisplayDensity=""4"" Direction=""0"" CoordinateSystemID="" 16 "" Display=""1"" Mx="" 2399,32 "" My="" 0,00 "" Mz="" 3655,37 "" HasVariableLoad=""0"" HasHeatGenTable=""0"" HadConvCoeffTable=""0"" HasRadTable=""0"" HasTransTable=""0"" HasVelTransTable=""0"" HasAccTransTable=""0"" HasVelFreqTable=""0"" HasAccFreqTable=""0"" HasFreqTable=""0"" HasFreqPhaseTable=""0"" HasAccFreqPhaseTable=""0""><Entity8 GeometryType=""0"" GeometryID="" 8 "" ComponentName="" Stab ""/></Load>" i = AddinObj.Run(strCmdNewSubcase1 ) i = AddinObj.Run(strCmdForLoad101 ) i = AddinObj.Run(strCmdForLoad102 ) i = AddinObj.Run(strCmdForLoad103 ) i = AddinObj.Run(strCmdForLoad104 ) i = AddinObj.Run(strCmdForLoad105 ) i = AddinObj.Run(strCmdForLoad106 ) i = AddinObj.Run(strCmdForLoad107 ) i = AddinObj.Run(strCmdForLoad108 ) i = AddinObj.Run(strCmdForLoad121 ) i = AddinObj.Run(strCmdForLoad122 ) i = AddinObj.Run(strCmdForLoad123 ) i = AddinObj.Run(strCmdForLoad124 ) i = AddinObj.Run(strCmdForLoad125 ) i = AddinObj.Run(strCmdForLoad126 ) i = AddinObj.Run(strCmdForLoad127 ) i = AddinObj.Run(strCmdForLoad128 ) iLogicVb.UpdateWhenDone = True End Sub

I generated all these sub coordinate systems first.

Now I want to test to bring all these forces and moments into my subcase 1.

 

Kind regards,

Daniel

0 Likes

Roelof.Feijen
Advisor
Advisor

Hello @dseiler35 ,

 

I don't know what is wrong with your code. Sometimes it adds only one load, another time it adds several loads before the error message appears. It seems random. Sorry I can not be of any help here. Maybe someone with more iLogic experience can tell what is wrong.

 

Roelof Feijen

If my post answers your question, please click the "Accept Solution" button. This helps everyone find answers more quickly!
0 Likes

dseiler35
Participant
Participant

Hello Roelof Feijen,

 

thank you anyway for your help and the effort.

 

Now I`m hoping for someone else helping me with this problem 😄

 

Kind regards,

Daniel

0 Likes

John_Holtz
Autodesk Support
Autodesk Support

Hi Daniel,

 

QA took a look at your issue and determine that there is some type of problem when working with assemblies. It seems to work with parts but behaves randomly when working with assemblies.

 

It has been reported to the developers.

 

For now, you will need to apply the loads manually if it does not work through the iLogic.

 

 



John Holtz, P.E.

Global Product Support
Autodesk, Inc.


If not provided already, be sure to indicate the version of Inventor Nastran you are using!

"The knowledge you seek is at knowledge.autodesk.com" - Confucius 😉

dseiler35
Participant
Participant

Hello John, hello all,

 

firstly, thank you very much for checking and forwarding the problem.

 

Another issue I`m dealing with and also I don't know if I should open a new thread or somebody can help me with here:

 

I changed my workflow now to derive components from my assembly and to apply my ilogic rules on the new generated part.

Now the problem is, when I`m running my rule I want to create loads at my workpoint I created. Now I checked that I can`t refer to those I created before with my rule. The rule always searches for vertex I normally need to chose when I apply the load manually. 

To my question:

 

Is there a possibility to define vertex points out of my work point or to refer the loads from my rule to the work points I created?

Now it`s like this, but I cant find my work point: 

GeometryType=""0"" 	GeometryID=""	1	""

I am struggeling with creating vertex in the "air", because they are not placed directly on my part (as you can see in attached file)

 

 

 

Thanks in advance!

 

Regards,

Daniel

0 Likes

dseiler35
Participant
Participant

Hello John,

 

are there already new insights into ilogic and the application of forces and load cases?

 

Unfortunately I cannot longer create subcases in parts with the ilogic rule...

I would also like to know whether an interface will be generated in ilogic in the future to apply forces directly to working points?

 

Regards,

Daniel

0 Likes