<< Click to Display Table of Contents > Entity Hierarchy |
☒ Set ☐ Get |
||
---|---|---|
DLL Function |
int CCI_Return = ScExecCommand(int Cmd_ID) |
|
ASCII Function |
int CCI_Return = ScCciExecCommand(int Cmd_ID) |
|
Description |
Group or ungroup selected entities. |
|
Cmd_ID |
Type: int |
ID: |
Location: ScComSAMLightClientCtrlExecCommandConstants |
||
scComSAMLightClientCtrlExecCommandGroupEntities |
59 |
|
Groups the manually or by EntitySelected selected entities and puts them into an entities group. |
||
scComSAMLightClientCtrlExecCommandUngroupEntities |
60 |
|
Ungroups the manually or by EntitySelected selected entities group. The view level of all entities inside the group will be decreased by one. |
||
CCI_Return |
Type: int |
|
CCI return number, see error list. |
||
Notes |
- |
|
C# Example: Select entities "entity1","entity2" and group them:
// Enable the possibility to set define multiple entities with one command int cur_Mode = 0; int CCI_Return_01 = cci.ScGetMode(ref cur_Mode); cur_Mode |= (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagEntity_NamesSeparatedBySemicolon; cci.ScSetMode(cur_Mode);
// select 3 entities int CCI_Return_02 = cci.ScSetEntityLongData("Entity1;Entity2;Entity3", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySelected, 1);
// group the selected entities int CCI_Return_03 = cci.ScExecCommand((int)ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandGroupEntities); |
Table 187: Entity Grouping
☒ Set ☐ Get |
|||
---|---|---|---|
DLL Function |
int CCI_Return = ScSetStringValue(int Value_Type, string Entity_Name) |
||
ASCII Function |
int CCI_Return = ScCciSetStringValue(int Value_Type, string Entity_Name) |
||
Description |
Sets top level to the entity with the specified name. The top level entity affects all further CCI commands that work with entity names or entity IDs. |
||
Value_Type |
Type: int |
ID: |
|
Location: ScComSAMLightClientCtrlValueTypes |
|||
scComSAMLightClientCtrlStringValueTypeSetToTopLevelEntity |
17 |
||
Entity_Name |
Type: string |
Unit: none |
|
The entity name. There are some special cases: •"": An empty string defines top level to the root of job entity list. •"style_entity_": Defines top level to the root of the Edit Styles list. •"drill_geom_": Defines top level to to the root of the Edit Drill Geometry entity list of currently selected pen. |
|||
CCI_Return |
Type: int |
||
CCI return number, see error list. |
|||
Notes |
•The current top level entity must not be deleted. Therefore, it is recommended to set the top level to the root of the job entity list after the task is completed. |
||
C# Example: Get entity type of first entity in group "B":
int CCI_Return_00 = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSetToTopLevelEntity, "B" ); string Entity_Type = ""; int CCI_Return_01 = cci.ScGetIDStringData( ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdGetEntityTypeAsInSAMLight, 1, ref Entity_Type ); int CCI_Return_02 = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSetToTopLevelEntity, "" ); |
|||
Set Hatch1A Angle of style "Style 1" to 45.0°:
int CCI_Return_00 = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSetToTopLevelEntity, "style_entity_" ); int CCI_Return_01 = cci.ScSetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSelectHatchPair, 0 ); int CCI_Return_02 = cci.ScSetEntityDoubleData( "Style 1", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchAngle1, 45.0 * Math.PI / 180.0 ); int CCI_Return_03 = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSetToTopLevelEntity, "" ); |
Table 188: Entity Top Level
|
☐ Set ☒ Get |
||
---|---|---|---|
DLL Function |
int CCI_Return = ScGetEntityStringData(string Search_Text, int Data_ID, ref string Path) |
||
ASCII Function |
string Text = ScCciGetEntityStringData(string Search_Text, int Data_ID) |
||
Description |
Find the path and Entity_Name of a Text2D entity by text content. |
||
Search_Text |
Type: string |
Unit: none |
|
Specify the searched text. |
|||
Data_ID |
Type: int |
ID: |
|
Location: ScComSAMLightClientCtrlFlags |
|||
scComSAMLightClientCtrlStringDataIdFindEntityWithText |
18 |
||
Path |
Type: string |
Unit: none |
|
The path in job including the Entity_Name. It starts with a full stop in front. Group names are separated by a full stop. If the entity is nested in several groups, all groups are named. |
|||
CCI_Return |
Type: int |
||
CCI return number, see error list. |
|||
Notes |
•SetToTopLevelEntity can be used to constrain the search. However, the complete path is always returned. |
||
C# Example: Find a Text2D entity with the text content "Cripps Pink":
string Path = ""; int CCI_Return = cci.ScGetEntityStringData( "Cripps Pink", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdFindEntityWithText, ref Path ); |
|||
Example: Interpret Path ".Fruit.Apple.Cultivar": The text searched for matches the Text2D entity "Cultivar" in the group "Fruit" and subgroup "Apple". |
Table 189: Find Text Entity