SOLIDOS API - SolidosCreateNode(parentHandle, nodeType, dictionary)
SolidosCreateNode(parentHandle, nodeType, dictionary) - Creates a SOLIDOS item
- Input Parameters
- parentHandle (Dynamo: String, Visual Lisp: Entity Name) - the identifier of the parent item in which the new item will be inserted
- nodeType (String) - the type of item to create, can be:
- Networks
- Devices
- Device - to create devices
It is mandatory to provide at least the following properties:
- Section (Dynamo: String, Visual Lisp: Entity Name) - the identifier of the typical section to be used to create the device
- Typical sections
- PartSize - to create typical device sections
It is mandatory to provide at least the following properties: properties:
- Constructor (Dynamo: String, Visual Lisp: Entity Name) - the identifier of the modeler to be used to create the typical section
- Interferences
- Interference - to create device interferences
It is mandatory to provide at least the following properties:
- Device1 (Dynamo: String, Visual Lisp: Entity Name) - the identifier of device 1
- Device2 (Dynamo: String, Visual Lisp: Entity Name) - the identifier of device 2
- Projections
- Projection - to create device projections
It is mandatory to provide at least the following properties:
- PView (Dynamo: String, Visual Lisp: Entity Name) - the identifier of the profile view or section view where the device will be projected
- Basins
- PointCatchment - to create a point basin
- LongCatchment - to create a longitudinal basin
- Basin Groups
- CatchmentGroup - to create a basin group
- Consumption sectors
- Sector - to create consumption sector
- Tables
- DeviceTable - to create device table
- CatchmentTable - to create catchment table
- SectorTable - to create consumption sector table
- NetworkTable - to create network tables
- Reports
- DeviceReport - to create device reports
- CatchmentReport - to create catchment reports
- SectorReport - to create consumption sector reports
- NetworkReport - to create network reports
- Labels
- Label - to create labels on devices, catchments, sectors and projections
- Styles
- Devices
- PointStyle - to create point style href="SolPointStyle.html">point device
- LinearStyle - to create a style of linear/longitudinal device
- Tables and Reports
- DeviceTableStyle - to create a style of table or report of devices
- NetworkTableStyle - to create a style of table or report of networks
- CatchmentTableStyle - to create a style of table or report of catchment basins
- SectorTableStyle - to create a style of table or report of consumption sectors
- Consumption Sector
- SectorStyle - to create a consumption sector style
- Contribution Basin
- CatchmentStyle - to create a contribution basin style
- Interferences
- InterferenceStyle - to create an interference style
- Rules
- PointRule - to create rules applicable to generic point devices
- LinearRule - to create rules applicable to generic linear devices
- LongRule - to create rules applicable to longitudinal devices generic
- GravityPointRule - to create rules applicable to point devices of gravity networks
- GravityLinearRule - to create rules applicable to linear devices of gravity networks
- GravityLongRule - to create rules applicable to longitudinal devices of gravity networks
- PressurePointRule - to create rules applicable to point devices of pressure networks
- PressureLinearRule - to create rules applicable to linear devices of pressure networks
- PointConnectRule - to create rules applicable to connected point devices
- Bill of Materials
- dictionary (Dictionary) - a dictionary (key, value), where:
- key - a string representing the name of the property to be set
- value - the value to be assigned to the property
- Output (string) - the handle (string) of the created item
- Errors that may occur
- "InvalidParentHandle" - the parentHandle provided is not valid, or is not the correct one. of a SOLIDOS item
- "InvalidNodeType" - the item type provided is not valid for insertion into the parent item
- "NoDictionary" - the dictionary provided is null
- "IsShortcutRef" - the parent item is an external reference
- "CannotAddFolder" - cannot add a folder to the parent item
- "BadSectionId" - when creating the device, the handle of the typical section was not provided, or it is invalid
- "BadViewId" - when creating the device projection, the handle of the profileview/sectionview was not provided, or it is invalid
- "BadDevice1Id" - when creating the device interference, the handle of device 1 was not provided, or it is invalid
- "BadDevice2Id" - when creating the device interference, the handle of device 1 was not provided, or it is invalid the handle of device 2, or it is invalid
- "CantAddLabel" - if the parent item cannot have a label
Example of usage in Visual Lisp:
(setq partLists (SolidosGetRootNode "PartsLists"))
propertiesList (list
"Name" "LISTA DE MATERIAL DRENAGEM"
"Description" "Lista de material aplicável a redes de drenagem")
partsList (SolidosCreateNode partLists "PartsList" propertiesList ) )
;<Entity name: 362es7c0150>
Example usage in Dynamo:
partLists = SolidosAPI.SolidosGetRootNode("PartsLists");
propertiesList = Dictionary.ByKeysValues(
["Name", "Description"],
["LISTA DE MATERIAL DRENAGEM", "Description" "Lista de material aplicável a redes de drenagem"]);
partsList = SolidosAPI.SolidosCreateNode(partLists, "PartsList", propertiesList);
#"AFD54"