Which classes are allowed where?

Hi,

during programming i sometimes don’t know where to put a class in the any-file. For instance when i want to use AnyMechOutputFileForceExport: where do i see in the documentation that it must be written within an AnyBodyStudy? The documentation for AnyBodyStudy has obligatory, optional, and denied-access members, but AnyMechOutputFileForceExport is not among those.

Thanks,

Thom

Hi Thom,

It’s right that it might not be always obvious where to insert an object. If you have any doubt the best way is to look in the reference manual. As for the AnyMechOutputFileForceExport, it is not a menber of the AnyBodyStudy even if it must be placed into it. So it is normal that you didn’t find it in the study menbers list.

You should look in the reference manual for the description of the object itself instead. For some of them (like the AnyMechOutputFileForceExport) you might have to refer to a parent class to find to information you seek, in this case the AnyOutputFile class. There you can see that all output files should be placed inside a study.

Best regards, Sylvain.

Thanks Sylvain,

now i have a similar problem with AnyMat33 which i want to insert into an AnySeg because i want to do perform transformation with a AnyRefNode. I can’t find the information where to place AnyMat33 within the AnySeg.
This question is not meant especially to this specific problem but more to understand how to proceed when i have the same problem in the future.

Thanks,

Thom

Hi Thom,

If you simple define a new variable of type AnyMat33, then you can place it pretty much everywhere you want it. If you need it for some computation inside a segment, then you can simply place it there.

In general I cannot really think of any restrictions on where you can place uder-defined variables inside folders. There are restrictions on which type of variables you can define. Some of the classes are virtual (only used for definition of other classes) and they cannot be used in variable definitions.

Best regards,
John

Thanks John,

now it works. Probably i forgot the “;” at the end of the line.

Thom