Barry wrote:
REF COMPONENT X31040608 , 80000
Hi Barry,
We're back to basic GDL syntax here: X31040608 looks like a variable to GDL, and as an uninitialized variable, its value is zero (0).
If these values are constants, as in your example, they must be in quotes since they are arbitrary text. (Of course, if the code was inside a string parameter or variable, such as strCode, then of course strCode would not be in quotes ... because you want the value of that variable.)
The following example works:
DATABASE_SET "AC_9_US"
REF COMPONENT "031-00000", "CSI.11"
But, note that "in real life" the DATABASE_SET command belongs in a MASTER_GDL script so that it is only executed once, unless you are pulling things from multiple databases.
HTH,
Karl
PS The above is just for illustration purposes and assumes some logic around the REF COMPONENT, as in Barry's example. If you just want to retrieve a component inside of an object, then use the user-friendly Components section of the GDL editor.
Create a New entry, then use Link to Database Item to create a hard-coded link, like the first line int the screenshot. All fields are locked, and match the database exactly. If you create a new entry and do not link, then you have pop-up menus to choose the database, key, and enter a new or existing code and text, etc. Probably not the greatest idea to do both since you could easily create conflicts with existing codes and names.
One of the forum moderators
AC 28 USA and earlier • macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB