Error message when loading model
Error message when loading model
Hi,
I have made a model with a CircleDiagram in it and two Initialize atoms. The first Initialize atom does a Dim([atmCircleDiagram], ...) so the Sink can do CircleDiagram_IncreaseSegmentScore(atmCircleDiagram, 1, 1). The second Initialize is used to clear the circle diagram on reset.
It worked yesterday but if I now load the model I get the following Error Messages:
1 Compile error: "atmCircleDiagram" is not a valid expression. Reference: if(Age(i)<12,CircleDiagram_IncreaseSegmentScore(atmCircleDiagram,1,1),CircleDiagram_IncreaseSegmentScore(atmCircleDiagram,2,1)) (KernelFnc)
2 Compile error: "atmCircleDiagram" is not a valid expression. Reference: if(Age(i)<12,CircleDiagram_IncreaseSegmentScore(atmCircleDiagram,1,1),CircleDiagram_IncreaseSegmentScore(atmCircleDiagram,2,1)) (KernelFnc)
3 Could not set expression to attribute 'EntryTrigger' on atom 'Sink4'. (KernelFnc)
What am I doing wrong?
Joeri
I have made a model with a CircleDiagram in it and two Initialize atoms. The first Initialize atom does a Dim([atmCircleDiagram], ...) so the Sink can do CircleDiagram_IncreaseSegmentScore(atmCircleDiagram, 1, 1). The second Initialize is used to clear the circle diagram on reset.
It worked yesterday but if I now load the model I get the following Error Messages:
1 Compile error: "atmCircleDiagram" is not a valid expression. Reference: if(Age(i)<12,CircleDiagram_IncreaseSegmentScore(atmCircleDiagram,1,1),CircleDiagram_IncreaseSegmentScore(atmCircleDiagram,2,1)) (KernelFnc)
2 Compile error: "atmCircleDiagram" is not a valid expression. Reference: if(Age(i)<12,CircleDiagram_IncreaseSegmentScore(atmCircleDiagram,1,1),CircleDiagram_IncreaseSegmentScore(atmCircleDiagram,2,1)) (KernelFnc)
3 Could not set expression to attribute 'EntryTrigger' on atom 'Sink4'. (KernelFnc)
What am I doing wrong?
Joeri
Re: Error message when loading model
Maybe the occurence of such an error depends on the order in which the atoms are loaded into the model. If so changing the order of the atoms in the model tree will resolve this problem.
Re: Error message when loading model
You are right.
The sequence of the atoms in the tree is important in this case. Make sure that the initialize atom that defines the variables is before the initialize atom that uses the variable in the tree.
The sequence of the atoms in the tree is important in this case. Make sure that the initialize atom that defines the variables is before the initialize atom that uses the variable in the tree.
Re: Error message when loading model
Hi,
I have a similar problem as Joeri stated in his post. How can I change the sequence of the atoms in the tree? Just select and drag the atoms in the Model Tree does not work.
However, when I add or remove some spaces in the 4DS code at each atom, the problem is solved. But I have to do this every time I open my model.
Anneke
I have a similar problem as Joeri stated in his post. How can I change the sequence of the atoms in the tree? Just select and drag the atoms in the Model Tree does not work.
However, when I add or remove some spaces in the 4DS code at each atom, the problem is solved. But I have to do this every time I open my model.
Anneke
Re: Error message when loading model
Hi Anneke,
You can change the sequence in the tree as follows:
- Select the atom that you want to change in the model tree.
- Open the interact window (shift + F6)
- Use the code setrank( 1, treeatom) to place the atom at rank 1 or replace it by another rank.
However, the spaces you mention could be another problem: it is not possible to declare reference names with spaces in it. If the ranking doesn't solve the problem, could you explain a bit more where you need to remove these spaces?
Regards, Marlies
You can change the sequence in the tree as follows:
- Select the atom that you want to change in the model tree.
- Open the interact window (shift + F6)
- Use the code setrank( 1, treeatom) to place the atom at rank 1 or replace it by another rank.
However, the spaces you mention could be another problem: it is not possible to declare reference names with spaces in it. If the ranking doesn't solve the problem, could you explain a bit more where you need to remove these spaces?
Regards, Marlies
Re: Error message when loading model
Hi Marlies,
Thanks for your fast reply! I have moved the ExcelActiveX atom up in the Model Tree, and a lot of errors were gone. About the white spaces in my 4ds code: I had some extra spaces at the end of each code, and when I removed / added some everything worked until I closed the model. But I don't have to do that anymore.
But there are still some errors which aren't fixed: I had made a Table 'A&B' and made an alias of it and used it to refer to. This did not work, so I removed the '&' sign from the Table and Alias name (='AB'). The referencing works now fine, but still get errors like:
- "Compile error: 'setA' is not a valid expression. Reference: cell(p(1), p(2), refA&B) (KernelFnc)"
- "Compile error: Statement 'B' has 0 parameters, must be 1 Reference: cell(p(1), p(2), refA&B) (KernelFnc)"
- "Error registering function 'A&B' to atom 'AB'. Check code. (KernelFnc)"
Do you know how to fix these errors?
Anneke
Thanks for your fast reply! I have moved the ExcelActiveX atom up in the Model Tree, and a lot of errors were gone. About the white spaces in my 4ds code: I had some extra spaces at the end of each code, and when I removed / added some everything worked until I closed the model. But I don't have to do that anymore.
But there are still some errors which aren't fixed: I had made a Table 'A&B' and made an alias of it and used it to refer to. This did not work, so I removed the '&' sign from the Table and Alias name (='AB'). The referencing works now fine, but still get errors like:
- "Compile error: 'setA' is not a valid expression. Reference: cell(p(1), p(2), refA&B) (KernelFnc)"
- "Compile error: Statement 'B' has 0 parameters, must be 1 Reference: cell(p(1), p(2), refA&B) (KernelFnc)"
- "Error registering function 'A&B' to atom 'AB'. Check code. (KernelFnc)"
Do you know how to fix these errors?
Anneke
Re: Error message when loading model
Hi Anneke,
I think that something went wrong with the unregistration of the functions A&B and SetA&B. To get rid of it I would suggest to remove this table from your model and afterwards add a new one.
Regards, Marlies
I think that something went wrong with the unregistration of the functions A&B and SetA&B. To get rid of it I would suggest to remove this table from your model and afterwards add a new one.
Regards, Marlies