Lookup — GstarCAD 2027
Lookup
GstarCAD 2027 · Command Reference
Using Lookup parameters and Lookup actions, you can extract the characteristics of the added parameters in the dynamic block, or you can assign values to these parameters in reverse to change the dynamic block.
1.Prepare view.
Prepare a view and define as a block.

2.Add Parameter of Lookup
Enter into the Block Editor by double-clicking the block or right-click the menu, click the button Lookup of Parameter in the Parameter panel, appoint the position of the Parameter according to the system prompt, as shown below.

After you add a Visibility parameter, the dynamic block should be able to achieve the effect shown in the figure below.

3.Add Linear Parameters
Four linear parameters need to be added to the dynamic block, the parameters are used to control the bolt, nut, shim and the base distance. In the following steps, you can use the Lookup function to adjust the values of these parameters to make the whole part be dynamically assembled or decomposed.

4.Change the type of the Value Set.
Select the Bolt Distance, then change the Dist type of the Value Set option to the List in the Properties palette and add a value of 0 in the Add Distance Value dialog box.

Similarly, change the distance type of all linear parameters to List and add a "0" value to the value list. The reason why a "0" value is added is that when the value is assigned to the corresponding parameter, the relevant part parameters are enough to realize assembly.
5.Change the grips of parameters.

6.Add actions
Add a move action for the Bolt Distance parameter as shown below.

Similarly, add move actions for the Base Distance, Shim Distance and Nut Distance as shown below.

7.Add Lookup parameter
To add Lookup parameters, you only need to specify the parameter location according to the command prompt, as the following picture.

8.Add Lookup action
Select the Lookup parameter as the associated parameter of the Lookup action and specify the location of the action label. At this time, the Property query table dialog box is displayed, as shown in the following figure.

Click the Add Properties button in the dialog box to add properties for the Lookup action.

Select all parameters and click OK. After returning to the Property query table, you will find that there are several more columns of parameters in the Input Properties box. Click the small button with triangle under the "visibility" parameter, and two options of "with bolt" and "without bolt" will pop up.

Similarly, click the small button under the "nut distance" parameter, and there are also two values in the drop-down list, which are the two values in the parameter list. The "0" value is specified by us, and the other value is the original value of the parameter.

In the Lookup box, we can directly enter a descriptive name. The added name will appear in the drop-down list of the query grip. Click a name, and the query function will automatically assign values to the corresponding parameters according to the series values on the left side of the name row. Through this assignment method, the parameter status can be quickly modified at one time.
Finally, complete the setting of the Property query table, and the setting effect is shown in the figure below.

9.Test the dynamic block.

It can be seen that the Lookup function can extract the characteristics of various parameters in the dynamic block and assign values to these parameters in batch, so as to quickly realize various complex adjustments of the dynamic block.