Команда "Создать"

From FreeCAD Documentation
Revision as of 10:31, 17 May 2020 by Baritone (talk | contribs) (Created page with "Для создания нового документа используйте метод {{incode|newDocument}} приложения FreeCAD.")

Std New

Системное название
Std New
Расположение в меню
Файл → Создать
Верстаки
All
Быстрые клавиши
Ctrl+N
Представлено в версии
-
См. также
Открыть файл,Импортировать файл

Описание

Команда Std New' создаёт новый пустой документ и делает его активным.

Использование

  1. Есть несколько способов вызвать команду:
    • Нажмите кнопку Std New .
    • Выберите в меню опцию Файл → Создать.
    • Используйте клавиатурное сокращение: Ctrl+N.

Настройки

  • FreeCAD создаст новый пустой документ при старте, если Инструменты → Редактор параметров... → BaseApp → Preferences → Document → CreateNewDoc. Это так же может быть изменено в Редакторе настроек.
  • Некоторые свойства документа: имена авторов, название компании и информация о лицензии могут быть предварительно установлены в Редакторе настроек.

Свойства

Most properties can also be changed in the dialog box of the Std ProjectInfo command.

  • ДанныеComment: Any comment that may apply.
  • ДанныеCompany: Company name. Can be preset.
  • ДанныеCreated By: Author name. Can be preset.
  • ДанныеCreation Date: Automatic date stamp. Not editable.
  • ДанныеFile Name: The full path of the file. Blank if the document has not been saved. Not editable.
  • ДанныеId: Not implemented yet.
  • ДанныеLabel: The name that will appear in the Tree view. By default the name of the document.
  • ДанныеLast Modified By: Author name. Can be preset.
  • ДанныеLast Modified Date: Automatic date stamp. Not editable.
  • ДанныеLicense: License type. Can be preset.
  • ДанныеLicense URL: License URL. Can be preset.
  • ДанныеShow Hidden: If true, items that have been hidden in the Tree view will be displayed anyway. Hiding items in the tree can be useful when working on larger models.
  • ДанныеTip: Not implemented yet.
  • ДанныеTip Name: Not implemented yet.
  • ДанныеTransient Dir: The transient directory used for recovery data. Not editable.

Scripting

Смотри так же: Основы скриптов в FreeCAD.

Для создания нового документа используйте метод newDocument приложения FreeCAD.

import FreeCAD
from pathlib import Path

# The folder and filename we will use:
fld = 'D:/testfiles/'
fnm = fld + 'test.FCStd'

# Make sure fld exists:
Path(fld).mkdir(parents=True, exist_ok=True)

doc = FreeCAD.newDocument()
doc.saveAs(fnm)

FreeCAD.closeDocument(doc.Name)

doc = FreeCAD.open(fnm)
doc.save()

FreeCAD.closeDocument(doc.Name)