Search found 30 matches

Go to advanced search

by sdaau_ml
Sat Jan 12, 2019 4:33 pm
Forum: Python scripting and macros
Topic: Temporarily remove object - re-add in FreeCAD Python?
Replies: 3
Views: 127

Re: Temporarily remove object - re-add in FreeCAD Python?

Many thanks @wmayer: In order to remove an object tmp. from the document you must open a transaction, remove the object(s) and commit the transaction. After having saved the document just call undo. ... But you must be care between opening and undoing a transaction not to call any other function tha...
by sdaau_ml
Sat Jan 12, 2019 4:22 pm
Forum: Python scripting and macros
Topic: Select All, Cut, Copy and Paste in FreeCAD Python?
Replies: 3
Views: 127

Re: Select All, Cut, Copy and Paste in FreeCAD Python?

Many thanks, @wmayer: The easiest would be: Gui.runCommand("Std_Copy") Gui.runCommand("Std_Cut") Gui.runCommand("Std_Paste") .... that is what I was looking for! :) EDIT: Note that in either of these cases, the calls to Copy/Cut/Paste are asynchronous, that is, calls like .postEvent or .runCommand w...
by sdaau_ml
Sat Jan 12, 2019 3:39 pm
Forum: Python scripting and macros
Topic: Select All, Cut, Copy and Paste in FreeCAD Python?
Replies: 3
Views: 127

Re: Select All, Cut, Copy and Paste in FreeCAD Python?

I really hope there is something better than the approach I'll list below - if there is, I'd love to hear about it. I just realized, it is possible to do copy/paste in FreeCAD Python, - by emulating keypresses with PySide (see also https://www.freecadweb.org/wiki/PySide_Advanced_Examples ) - here so...
by sdaau_ml
Sat Jan 12, 2019 2:25 pm
Forum: Python scripting and macros
Topic: Select All, Cut, Copy and Paste in FreeCAD Python?
Replies: 3
Views: 127

Select All, Cut, Copy and Paste in FreeCAD Python?

OS: Ubuntu 18.04.1 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.15379 (Git) Build type: Release Branch: master Hash: 3290c36d28551875f02333c2e01af80e38b8ad02 Python version: 2.7.15rc1 Qt version: 4.8.7 Coin version: 4.0.0a OCC version: 7.3.0 Locale: English/UnitedStates (e...
by sdaau_ml
Sat Jan 12, 2019 12:38 pm
Forum: Python scripting and macros
Topic: Temporarily remove object - re-add in FreeCAD Python?
Replies: 3
Views: 127

Temporarily remove object - re-add in FreeCAD Python?

OS: Ubuntu 18.04.1 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.15379 (Git) Build type: Release Branch: master Hash: 3290c36d28551875f02333c2e01af80e38b8ad02 Python version: 2.7.15rc1 Qt version: 4.8.7 Coin version: 4.0.0a OCC version: 7.3.0 Locale: English/UnitedStates (e...
by sdaau_ml
Sat Jan 12, 2019 12:23 pm
Forum: Python scripting and macros
Topic: getObjectsByLabel - with regex?
Replies: 3
Views: 166

Re: getObjectsByLabel - with regex?

Hi @DeepSOIC, @wmayer Thanks a ton for the responses! After all the OP didn't make a request that getObjectsByLabel should support regular expressions and thus it was never implemented. Ok, now I get it - much appreciated! use re module from standard python library. You'll have to iterate through al...
by sdaau_ml
Fri Jan 11, 2019 12:41 pm
Forum: Python scripting and macros
Topic: getObjectsByLabel - with regex?
Replies: 3
Views: 166

getObjectsByLabel - with regex?

I have read in getObjectsByLabel - FreeCAD Forum : Or can I use this call with wildcards to get more objects? No, you can't. If you like this can be changed to support regular expressions. I'm not sure what they meant exactly by "this can be changed to support regular expressions." - whether I as us...
by sdaau_ml
Sat Dec 22, 2018 5:11 pm
Forum: Help on using FreeCAD
Topic: Cannot create face from default Cube vertices in Part/Shapebuilder?
Replies: 1
Views: 75

Cannot create face from default Cube vertices in Part/Shapebuilder?

Hi all, OS: Ubuntu 18.04.1 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.15379 (Git) Build type: Release Branch: master Hash: 3290c36d28551875f02333c2e01af80e38b8ad02 Python version: 2.7.15rc1 Qt version: 4.8.7 Coin version: 4.0.0a OCC version: 7.3.0 Locale: English/UnitedSt...
by sdaau_ml
Sat Dec 22, 2018 5:02 pm
Forum: Python scripting and macros
Topic: [SOLVED] "command not done" when doing Wiki tutorial
Replies: 3
Views: 158

Re: "command not done" when doing Wiki tutorial

Thanks a ton, @Jee-Bee:
Jee-Bee wrote:
Sat Dec 22, 2018 4:49 pm

Code: Select all

L1 = Part.LineSegment(V1,V2)
L2 = Part.LineSegment(V4,V3)
Part.Line is pre 0.16 code... I guess this was forgotten. Part.Line is now infinite line
Yes, that works! Thanks again!
by sdaau_ml
Sat Dec 22, 2018 4:38 pm
Forum: Python scripting and macros
Topic: [SOLVED] "command not done" when doing Wiki tutorial
Replies: 3
Views: 158

[SOLVED] "command not done" when doing Wiki tutorial

Hi all, OS: Ubuntu 18.04.1 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.15379 (Git) Build type: Release Branch: master Hash: 3290c36d28551875f02333c2e01af80e38b8ad02 Python version: 2.7.15rc1 Qt version: 4.8.7 Coin version: 4.0.0a OCC version: 7.3.0 Locale: English/UnitedSt...

Go to advanced search