Last active
October 24, 2017 19:36
-
-
Save sheetd/c4f870969acb0b479b25651e83b36e6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extracts vertices from a polyline. Used on SNC Framing template | |
let crvInput (GeometricFeature) | |
let listInput (List) | |
let mySeg (Curve) | |
let i (Integer) | |
// Select segments form polyline | |
crvInput = Wireframe\Vert\CRV_VertMid | |
set listInput = crvInput.GetSubElements(1 , false) | |
Notify("segments: #", listInput.Size() ) | |
// Create new segments on inputs | |
i = 1 | |
for i while i <= listInput.Size() { | |
mySeg = CreateOrModifyDatum("Curve" , `Geometrical Set.22\Geometrical Set.29` , `Geometrical Set.22\Relations.2\Knowledge Pattern.1\List.1` , i) | |
//set mySeg = listInput.GetItem(i) //works but throws name error, why? | |
set mySeg = extract(listInput.GetItem(i) , 1) | |
mySeg.Name = "CRV_" + i | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment