1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Revit Api pyrevitでEnumを使う

Last updated at Posted at 2019-05-27
sample.py
from rpw import DB
from rpw.utils.dotnet import Enum
for bip in Enum.GetValues(DB.BuiltInParameter):
	print bip

for bip in Enum.GetNames(DB.BuiltInParameter):
	print bip
	print type(bip)

for pt in Enum.GetValues(DB.ParameterType):
	print pt
	print type(pt)

BuiltInParameterをrpwを使ってPythonで書くときにEnumをどこからインポートしたら良いか詰まりました。
Enum.GetValues()では'BuiltInParameter'、Enum.GetNames()だと'str'を返します。

参考にしたリンクはこちら。
https://thebuildingcoder.typepad.com/blog/2011/08/built-in-parameter-name-and-labelutils.html

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?