@@ -292,10 +292,10 @@ def create_unique_id(self):
292292 except (IndexError , ValueError ):
293293 pass
294294 secure_random = secrets .SystemRandom ()
295- id = secure_random .randint (1 , 65535 )
296- while id in element_ids :
297- id = secure_random .randint (1 , 65535 )
298- return id
295+ comp_id = secure_random .randint (1 , 65535 )
296+ while comp_id in element_ids :
297+ comp_id = secure_random .randint (1 , 65535 )
298+ return comp_id
299299
300300 @pyaedt_function_handler ()
301301 def add_pin_iports (self , name , id_num ):
@@ -1083,9 +1083,9 @@ def create_nexxim_state_space_component(
10831083 arg1 = ["NAME:ComponentProps" , "Name:=" , str (model_name )]
10841084 arg2 = ["NAME:Attributes" , "Page:=" , 1 , "X:=" , xpos , "Y:=" , ypos , "Angle:=" , angle , "Flip:=" , False ]
10851085 comp_name = self .oeditor .CreateComponent (arg1 , arg2 )
1086- id = int (comp_name .split (";" )[1 ])
1087- self .add_id_to_component (id , comp_name )
1088- return self .components [id ]
1086+ comp_id = int (comp_name .split (";" )[1 ])
1087+ self .add_id_to_component (comp_id , comp_name )
1088+ return self .components [comp_id ]
10891089
10901090 @pyaedt_function_handler (inst_name = "name" )
10911091 def create_component (
@@ -1150,16 +1150,16 @@ def create_component(
11501150 angle = math .pi * angle / 180
11511151 arg2 = ["NAME:Attributes" , "Page:=" , page , "X:=" , xpos , "Y:=" , ypos , "Angle:=" , angle , "Flip:=" , False ]
11521152 comp_name = self .oeditor .CreateComponent (arg1 , arg2 )
1153- id = int (comp_name .split (";" )[1 ])
1153+ comp_id = int (comp_name .split (";" )[1 ])
11541154 # self.refresh_all_ids()
11551155 self .add_id_to_component (id , comp_name )
11561156 if name :
1157- self .components [id ].set_property ("InstanceName" , name )
1157+ self .components [comp_id ].set_property ("InstanceName" , name )
11581158 if use_instance_id_netlist :
11591159 self .enable_use_instance_name (component_library , component_name )
11601160 elif global_netlist_list :
11611161 self .enable_global_netlist (component_name , global_netlist_list )
1162- return self .components [id ]
1162+ return self .components [comp_id ]
11631163
11641164 @pyaedt_function_handler (component_name = "assignment" )
11651165 def disable_data_netlist (self , assignment ):
@@ -1284,9 +1284,9 @@ def create_symbol(self, name, pins):
12841284 ]
12851285 self .osymbol_manager .Add (arg )
12861286
1287- id = 2
1287+ comp_id = 2
12881288 i = 1
1289- id += 2
1289+ comp_id += 2
12901290 r = numpins - (h * 2 )
12911291 for pin in pins :
12921292 arg .append (
0 commit comments