Arch IfcSpreadsheet: Difference between revisions

From FreeCAD Documentation
(→‎How to use: Scripting section)
(→‎Scripting: Code more complete)
Line 20: Line 20:


== Scripting ==
== Scripting ==
{{Emphasis|See also:}} [[Arch API]] and [[FreeCAD Scripting Basics]].
Arch.makeIfcSpreadsheet(FreeCAD.ActiveDocument.Wall015)

This tool can be used in [[macros]] and from the [[Python]] console by using the following function:
</translate>
{{Code|code=
spreadsheet = makeIfcSpreadsheet(archobj=None)
}}
<translate>

* Creates a {{incode|spreadsheet}} object. Optionally an {{incode|archobj}} can be given.

Example:
{{Code|code=
import FreeCAD, Draft, Arch

Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0), FreeCAD.Vector(2000, 2000, 0)])
Wall = Arch.makeWall(Line, width=150, height=3000)
FreeCAD.ActiveDocument.recompute()

spreadsheet = Arch.makeIfcSpreadsheet(Wall)
}}


<!--T:2-->
<!--T:2-->

Revision as of 00:04, 3 December 2018

This documentation is not finished. Please help and contribute documentation.

GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.

See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.

Arch MakeIfcSpreadsheet

Menu location
Arch → Utilities → Create IFC spreadsheet
Workbenches
Arch
Default shortcut
I P
Introduced in version
-
See also
Arch IFC, Arch IfcExplorer

Description

This tool creates a spreadsheet to store IFC properties of an object.

How to use

  1. Select an object.
  2. Go to Arch → Utilities → Create IFC spreadsheet.

Scripting

See also: Arch API and FreeCAD Scripting Basics.

This tool can be used in macros and from the Python console by using the following function:

spreadsheet = makeIfcSpreadsheet(archobj=None)
  • Creates a spreadsheet object. Optionally an archobj can be given.

Example:

import FreeCAD, Draft, Arch

Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0), FreeCAD.Vector(2000, 2000, 0)])
Wall = Arch.makeWall(Line, width=150, height=3000)
FreeCAD.ActiveDocument.recompute()

spreadsheet = Arch.makeIfcSpreadsheet(Wall)