Getting element from Reference

How to get the element from the reference ?

Get element from Reference class
Get element from Reference class

Look at the code snippet above, you can simply get the element from the reference by using the GetElement() method of document class

You can now use this element object to perform any operation on that element.

How to get multiple elements through selection ?

Question
Question

To select the multiple elements we need to use the Pickobjects method of Reference class instead of using PickObject

Here is how you can do so......

  • For selecting multiple element we need to declare a list of Reference

  • We have to declare a list of element

  • Now we have to iterate through the reference (foreach loop) to get the element for each reference and adding it to the list of Element.

Element getting withuot LINQ
Element getting withuot LINQ
Elment getting using LINQ
Elment getting using LINQ

Using LINQ query

Not Using LINQ query

See the Below two codes !

The only difference is that the code snippet in the left using LINQ for getting element from reference whereas the code snippet in the right getting element without using LINQ that is using simple foreach loop.