Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

create schema dynamo revit

component = UnwrapElement(IN[0])

TransactionManager.Instance.EnsureInTransaction(doc)

def create_schema():
    schema_guid = System.Guid("DF3BBCC1-4D4D-4A01-B444-F9722814F9CE")
    schema_builder = SchemaBuilder(schema_guid)
    schema_builder.SetReadAccessLevel(AccessLevel.Public)
    schema_builder.SetWriteAccessLevel(AccessLevel.Public)
    schema_builder.SetSchemaName("TestSchema")
    schema_builder.SetDocumentation("Test schema to store ids")
    field_builder = schema_builder.AddSimpleField("ParentComponentID", System.String)
    schema = schema_builder.Finish()
    return schema

def add_schema_instance(schema, rvt_element):
    field = schema.GetField("ParentComponentID")
    schema_instance = Entity(schema)
    schema_instance.Set[System.String](field, "ID0004")
    rvt_element.SetEntity(schema_instance)
    

TransactionManager.Instance.TransactionTaskDone()

schema = create_schema()
Comment

PREVIOUS NEXT
Code Example
Python :: add hours to date time in python 
Python :: how to import autpy 
Python :: flash not defined python flask 
Python :: Type conversions in python 
Python :: jpg image in tkinter title 
Python :: Check for strings as positive/negative - integer/float 
Python :: How to get a mock image in django? 
Python :: credential not provided when i try to sign up a new user django 
Python :: how to use python-socker.io with fast api 
Python :: grandest staircase foobar 
Python :: miktex python install linux 
Python :: django pointfield value format for fixtures 
Python :: how to make an infinite loop in python 
Python :: delete row by index pandas 
Python :: precondition error tensorflow predict 
Python :: django send_mail not working in testcase 
Python :: python plot auc 95% confidence intervals stackoverflow 
Python :: django import excel file from same directory 
Python :: create line in canvas widget object 
Python :: jsonpickle exclude py/object 
Python :: pydictionary 
Python :: get length of a tuple in python 
Python :: how to put 2 code n 1 line in python 
Python :: pyqt5 udp example 
Python :: create animation from sequence of image python 
Python :: pandas 3d set camara cords 
Python :: messe graphen erstellen python 
Python :: convert python code to c online free 
Python :: how to print a character n times in python 
Python :: how to change directory in python 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =