"Box Selection" in a 2D Techdraw drawing

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
ToniTen
Posts: 242
Joined: Fri Sep 04, 2020 10:11 am

"Box Selection" in a 2D Techdraw drawing

Post by ToniTen »

Hello everybody. Here's my FreeCAD data:

Code: Select all

OS: Ubuntu 18.04.5 LTS (XFCE/xubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 035993c96862b3b54a472be0e3eb446f6a23bd7c
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Spanish/Spain (es_ES)
I've been following with FreeCAD for a while, and I'm impressed with how things are evolving, to the point that I'm trying to move my workflows to it. As part of making technical drawings for manufacturing, I often need to add a lot of Dimensions, and quite often, I then need to format and align them afterwards. I've been using the wonderful TDChainDistances macro from https://github.com/reox/FreeCAD_macros for this. However, it is bothersome to control-click to select large numbers of dimensions, and prone to error. and yesterday I swear I managed to "Box/rectangle" select multiple dimensions so I could handle them at the same time, but I've been unable to reproduce this. Was I dreaming? I've tried looking for this, on the wiki, forums, and even on external sites, with no luck. All the references to box selection are for the 3D view (which is very handy), which is not what I'm looking for.
Syres
Veteran
Posts: 2899
Joined: Thu Aug 09, 2018 11:14 am

Re: "Box Selection" in a 2D Techdraw drawing

Post by Syres »

AxisAutomation wrote: Fri Sep 04, 2020 10:28 am yesterday I swear I managed to "Box/rectangle" select multiple dimensions so I could handle them at the same time, but I've been unable to reproduce this. Was I dreaming?
I think you were dreaming as I'm not aware this can be done, if you have only a few dimensions that do not need selecting then why not run this macro to select all DistanceX and DistanceY dimensions and then you only have de-select the few not required?

Code: Select all

doc = App.ActiveDocument
for obj in doc.Objects: 
    if obj.isDerivedFrom("TechDraw::DrawViewDimension"):
        if obj.Type == 'DistanceX' or obj.Type == 'DistanceY':
            Gui.Selection.addSelection(doc.Name,obj.Name)
chrisb
Veteran
Posts: 54195
Joined: Tue Mar 17, 2015 9:14 am

Re: "Box Selection" in a 2D Techdraw drawing

Post by chrisb »

Moved to TechDraw forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
wandererfan
Veteran
Posts: 6315
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: "Box Selection" in a 2D Techdraw drawing

Post by wandererfan »

AxisAutomation wrote: Fri Sep 04, 2020 10:28 am I managed to "Box/rectangle" select multiple dimensions so I could handle them at the same time, but I've been unable to reproduce this.
There is no code in TechDraw to implement rubber band selection. The only way I know to select multiple items on the page is ctrl-select. In the tree you can do the usual ctrl-select or shift-select.
Post Reply