Search found 437 matches

by galou_breizh
Thu Nov 30, 2023 12:15 pm
Forum: Python scripting and macros
Topic: When is FreeCAD.GuiUp defined?
Replies: 4
Views: 2256

Re: When is FreeCAD.GuiUp defined?

@wmayer Any reaction on this?

Thanks!
by galou_breizh
Wed Nov 29, 2023 10:00 am
Forum: Python scripting and macros
Topic: External Spreadsheets Macro
Replies: 2
Views: 1778

Re: External Spreadsheets Macro

@turoj Nice macro! The link is broken however.

I invite you to publish your macro to the official macro repository.

Gaël
by galou_breizh
Tue Nov 28, 2023 4:13 pm
Forum: Python scripting and macros
Topic: New Macro " Sketch Constraint From Spreadsheet"
Replies: 35
Views: 9015

Re: New Macro " Sketch Constraint From Spreadsheet"

@2cv001 Don't you want to you post your macro to the official macro repository?
by galou_breizh
Thu Nov 23, 2023 9:59 am
Forum: Developers corner
Topic: Quantity.getValueAs() is a Quantity, not a float in Python
Replies: 7
Views: 3600

Re: Quantity.getValueAs() is a Quantity, not a float in Python

Just to precise, Quantity.getValueAs() returns a unit-less Quantity.
by galou_breizh
Wed Nov 22, 2023 7:50 am
Forum: Developers corner
Topic: Quantity.getValueAs() is a Quantity, not a float in Python
Replies: 7
Views: 3600

Quantity.getValueAs() is a Quantity, not a float in Python

type(App.Units.Quantity('89 mm').getValueAs('m')) returns <class 'Base.Quantity'> I know some workarounds but the help of getValueAs() states "returns a floating point value as the provided unit" and the returned quantity may even be another physical quantity if the unit used in getValueA...
by galou_breizh
Sat Sep 16, 2023 1:21 pm
Forum: Python scripting and macros
Topic: Auto conversion from Part to Macro?
Replies: 5
Views: 650

Re: Auto conversion from Part to Macro?

Try the ObjectToPython macro.
by galou_breizh
Mon Sep 04, 2023 7:53 am
Forum: Developers corner
Topic: xml.etree.ElementTree imported twice?
Replies: 1
Views: 1753

xml.etree.ElementTree imported twice?

Dear Python FreeCAD experts, the import I'm talking about is import xml.etree.ElementTree as et . I'm facing an issue that the module is imported twice and thus et.tostring has issues with et.Comment which is created by another instance of the module. The code I'm talking about is https://github.com...
by galou_breizh
Thu Jun 01, 2023 2:27 pm
Forum: Python scripting and macros
Topic: Call for help: document the list of available object types of the Wiki
Replies: 8
Views: 1151

Re: Call for help: document the list of available object types of the Wiki

This is a friendly reminder for any volunteer willing to share her knowledge.

Thanks,
Gaël
by galou_breizh
Tue Apr 18, 2023 6:25 am
Forum: Python scripting and macros
Topic: When is FreeCAD.GuiUp defined?
Replies: 4
Views: 2256

When is FreeCAD.GuiUp defined?

Hi all, I'm writing a workbench in Python and I try to understand something about FreeCAD.GuiUp[/code]. I added import FreeCAD print(f'FreeCAD.GuiUp: {FreeCAD.GuiUp}') at the end of __init__.py of the staterkit . Here's FreeCAD's output During initialization the error "module 'FreeCAD' has no a...