Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
GenerativeComponents
  • Product Communities
GenerativeComponents
GenerativeComponents Community Wiki Selection of points based on range of indices
    • Sign In
    • +An Overview of GenerativeComponents
    • +Addin Content
    • +Bentley BIM Modeler Accreditation – Program Overview
    • +C# Sample Solution and other Add-ins
    • +GenerativeComponents Solutions
    • +Learn GenerativeComponents
    • +Reference Material
    • Support for GenerativeComponents
    • -Tutorials
      • 3D array copy surface
      • Add RFA data as BuildingContent to ABD with GC Extension
      • BSplineSurface.LoftCurve is throwing an error when trying to add get the curves from cell
      • Cell Feature
      • Create a Set of Random Points
      • Creation of Global function from Custom function
      • Creation of Parabolic curve
      • Error while creating GNT
      • Free Form Roof Example
      • GC Excel Feature
      • GenerativeComponents Essentials Course
      • Get Corner points of a Solid
      • How To Create Surface From Lines & Curves
      • How to Export GC elements
      • How to get concrete sections in the cross-section dialog in Generative Components
      • Landscape Bridge Example
      • +LawCurve
      • List Of Points With A Loop Example
      • Mesh feature 3d print
      • Modular Multiplication On Circle
      • +Operation Node
      • +Optimization with the Optimizer node type
      • Palm Tree Modeler
      • Point By Function Example
      • Points On Curve
      • Prime Number Pattern
      • Selection of Points
      • Selection of points based on Query Expressions
      • Selection of points based on range of indices
      • Set a New Property Value to a Set of Selected Nodes
      • Simple Bridge Example
      • Simple Equations To Describe Form Example
      • Simple Free Form Roof Example
      • Sin Tower
      • Skeleton
      • Sunflower Seed Pattern Modelling
      • Surface Division Basic Steps
      • Surface from Rails and Swept Sections
      • The use of Packager in Generative Components
      • +Tools and Techniques
      • Ulam Spiral From A Rectangular Spiral
      • Video Tutorials
      • Video Tutorials - Short Techniques
      • Working with Parametric cells
    • +User Projects
    • +Visualized Parametric Experimentations
    • +zed_Older Content

     
     Questions about this article, topic, or product? Click here. 

    Selection of points based on range of indices

      Product(s): OpenBuildings Generative Components
      Version(s): 10.06.00.64
      Environment:  N\A

     

    Background

    You have a series of Points and want to select a sub-set of Points from that series.  

    Steps to Accomplish

    Method 1:

    If we need to select the first few points in a point series, we can do it by using the below expression:

    Point1.First(10)

    This means the selected points will be the first 10 points of the series (Point1[0] to Point1[9])

    To identify the sub-set of points, we will create vertical lines on those selected Points. Here Point1 is the set of points and it begins from left to right. (The same process will also be followed in the below mentioned methods)



    Method 2:

    If we need to select the last few points in a point series, we can do it by using the below expression:

    Point1.Last(5)

    This means the selected points will be last 5 points of the series.



    Method 3 :

    If we need to select points in the middle of a point series, we can do it by using the below expression: 

    Point1.First(10).Last(6)

    This means the selected points will be Point1[4] to Point1[9]. In this expression the selection of points will begin with point number 9, as 10 is an argument to the list method, and the last "(6)" designates the number of points that will be taken in the set. That means point 4, point 5, point 6 -- through point 9 will be selected.



    Please go through the sample file,  https://communities.bentley.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-28/Selection-of-Points-by-Range-Indices.gct

    Note: 

    For OBD Update 7 and later versions the First has been changed to Take and Last has been changed to TakeLast. The functionality is similar as the previous functions, only the name of the functions have been changed.

    • OBD
    • GC Feature
    • OpenBuildings Designer
    • Point Series
    • Point
    • Range Index
    • GenerativeComponents
    • Generative Design
    • GenerativeComponents CONNECT Edition
    • Point from Point series
    • Select a Point
    • Share
    • History
    • More
    • Cancel
    • Alifur Mandal Created by Bentley Colleague Alifur Mandal
    • When: Mon, Dec 2 2019 6:05 AM
    • Alifur Mandal Last revision by Bentley Colleague Alifur Mandal
    • When: Thu, Oct 22 2020 9:45 PM
    • Revisions: 7
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies