# Moving component and primitive inside the component

**URL:** <https://librepcb.discourse.group/t/moving-component-and-primitive-inside-the-component/800>\
**Category:** Improvement Ideas\
**Created:** [September 20, 2024, 4:54pm UTC](https://librepcb.discourse.group/t/moving-component-and-primitive-inside-the-component/800 "2024-09-20T16:54:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![giancarlo64](https://yyz2.discourse-cdn.com/free1/user_avatar/librepcb.discourse.group/giancarlo64/32/296_2.png) [@giancarlo64](https://librepcb.discourse.group/u/giancarlo64)\
**Post date:** [September 20, 2024, 4:54pm UTC](https://librepcb.discourse.group/t/moving-component-and-primitive-inside-the-component/800/1 "2024-09-20T16:54:48Z")

</div>

Hi,  
I have some problem moving the components on the Schematic. If I draw the symbol using a box (polygon or rectangle or circle …) I only need to select inside the box to move the component, but if I draw the symbol using line I have to select the whole component (like in the picture) to know where to pick up the component to move it. Could be an improvement for a next release only to select inside the drawn lines?

And another question. Is normal that in the schematic I can move a primitive of a component like for example in the attached image the text PB5 or PB4? The component should be a “unified” element.  
To move one “primitive” it would be better to use a special keys combination (ctrl or alt)

 ![move_comp](https://global.discourse-cdn.com/free1/uploads/librepcb1/original/1X/6740d623ae06f982c6d65d1008822fe997c90483.png)

---

<div class="post-metadata">

**Author:** ![ubruhin](https://avatars.discourse-cdn.com/v4/letter/u/c89c15/32.png) [@ubruhin](https://librepcb.discourse.group/u/ubruhin)\
**Post date:** [September 20, 2024, 8:49pm UTC](https://librepcb.discourse.group/t/moving-component-and-primitive-inside-the-component/800/2 "2024-09-20T20:49:53Z")

</div>

Hi,

> [@giancarlo64](#):
>
> I have some problem moving the components on the Schematic. If I draw the symbol using a box (polygon or rectangle or circle …) I only need to select inside the box to move the component, but if I draw the symbol using line I have to select the whole component (like in the picture) to know where to pick up the component to move it. Could be an improvement for a next release only to select inside the drawn lines?

It’s technically not feasible to implement that, and there will always be cases where this behavior would not be desired. Just use polygons and everything works fine, I see no reason for using just lines.

> [@giancarlo64](#):
>
> Is normal that in the schematic I can move a primitive of a component like for example in the attached image the text PB5 or PB4? The component should be a “unified” element.

Why did you add all the pin texts manually? By default the pins already show a text, and those won’t be selectable and movable in the schematic, which is exactly what you’re asking for.  
Just use LibrePCB the way it is intended and it will work fine 🙂

---

<div class="post-metadata">

**Author:** ![giancarlo64](https://yyz2.discourse-cdn.com/free1/user_avatar/librepcb.discourse.group/giancarlo64/32/296_2.png) [@giancarlo64](https://librepcb.discourse.group/u/giancarlo64)\
**Post date:** [September 21, 2024, 8:01am UTC](https://librepcb.discourse.group/t/moving-component-and-primitive-inside-the-component/800/3 "2024-09-21T08:01:27Z")

</div>

Hi ubruhin,  
I modified the symbol and now it is no problem to select it

 ![move_comp2](https://global.discourse-cdn.com/free1/uploads/librepcb1/original/1X/f76b472e157b22343a4e3481c0198c11fb3eb0b8.png)

I added the name manually because I saw that giving the same name to the pin rise an error message in the symbol. I wanted to avoid errors. " My philosophy" is to show every pin in the symbol also if the pins are the same signal (like VCC and GND). With the modified symbol with the same pins name, I have verified and the errors in the symbol seems to give no problem in the schematic and PCB. Can you confirm me?

Updating the Schematic with the “Update project library” upload the new Component but I see that the old text has not been deleted (I moved one text over the pin name only to show that is a text).

 ![move_comp3](https://global.discourse-cdn.com/free1/uploads/librepcb1/original/1X/509dfffb2b639c4f4780cb0034c6aa6720d23973.png)

I had to delete it and place the new component but this delete me also most of the connections

 ![move_comp4](https://global.discourse-cdn.com/free1/uploads/librepcb1/original/1X/0674db22a67fe5dbe81259026bf32f479c7fb1ab.png)

Is there a way to avoid it?

By The way I also use text like you see to identify different blocks in the the Component (LDO, Switch Capacitor, AC-IN …) theses Text are still not fixed to the device. Is not a problem but perhaps in the future it would be nice to have the possibility to lock/unlock text in the symbol (if is not to difficult to implement).

Gian Carlo

---

<div class="post-metadata">

**Author:** ![ubruhin](https://avatars.discourse-cdn.com/v4/letter/u/c89c15/32.png) [@ubruhin](https://librepcb.discourse.group/u/ubruhin)\
**Post date:** [September 22, 2024, 12:45pm UTC](https://librepcb.discourse.group/t/moving-component-and-primitive-inside-the-component/800/4 "2024-09-22T12:45:55Z")

</div>

> [@giancarlo64](#):
>
> With the modified symbol with the same pins name, I have verified and the errors in the symbol seems to give no problem in the schematic and PCB. Can you confirm me?

If you really want each GND pin separately, I’d recommend naming them GND1, GND2 etc to avoid the warnings. However, I confirm there _should_ be no harm to name them all the same and ignore the warning.

> [@giancarlo64](#):
>
> Updating the Schematic with the “Update project library” upload the new Component but I see that the old text has not been deleted

Right click on the symbol and choose “Reset All Texts” should do the trick without loosing all the connections.

> [@giancarlo64](#):
>
> By The way I also use text like you see to identify different blocks in the the Component (LDO, Switch Capacitor, AC-IN …) theses Text are still not fixed to the device. Is not a problem but perhaps in the future it would be nice to have the possibility to lock/unlock text in the symbol (if is not to difficult to implement).

Yes I also had this in mind and planned to implement it:

> <https://github.com/LibrePCB/LibrePCB/issues/1436>
>
> \##### SUMMARY
> \<!-- Describe what feature should be added or improved, or what u…sability flaw
> you encountered. Provide screenshots if reasonable. --\>
> 
> Most symbols and footprints contain texts for \`{{NAME}}\` and \`{{VALUE}}\`, which are movable independent of the symbol/footprint in the schematic/board editors to optimize their placement for better readability etc. But sometimes there are texts which are not intended to be movable, those are sometimes even a little bit annoying when dragging them by accident. Examples:
> 
> !\[image\](https://github.com/user-attachments/assets/3a906512-ef22-4f61-a38b-888dff6706db)
> 
> Or an extreme case, the schematic frame:
> 
> !\[image\](https://github.com/user-attachments/assets/7204500b-877d-4671-a770-c093b0643f42)
> 
> \##### SOLUTION
> 
> Texts in boards already contain a property \`locked\` to lock their placement within the board. We could add the exact same property also to symbol- & footprint texts, just with a slightly different purpose: making them completely non-editable & non-draggable in schematics & boards, i.e. making them read-only.
> 
> However, there might still be rare cases where a user wants to modify such a text (especially for the schematic frame, e.g. to change the font size). To still allow that, probably we should provide some "override mode". Not sure how exactly, maybe in the context menu of symbols/footprints provide some "lock/unlock texts" option.

Urban
