API Reference > bentleyjs-core > Ids > Id64 > Id64.toIdSet Id64.toIdSet Function Convert an Id64Arg into an Id64Set. This method can be used by functions that accept an Id64Arg to conveniently process the value(s). For example: public addCategories(arg: Id64Arg) { Id64.toIdSet(arg).forEach((id) => this.categories.add(id)); } Alternatively, to avoid allocating a new Id64Set, use Id64.iterable. toIdSet(arg: Id64Arg, makeCopy: boolean = false): Id64Set Parameter Type Description arg Id64Arg The Ids to convert to an Id64Set. makeCopy boolean If true, and the input is already an Id64Set, returns a deep copy of the input. Returns - Id64Set An Id64Set containing the set of Id64Strings represented by the Id64Arg. Defined in core/bentley/src/Id.ts Line 330 Last Updated: 12 June, 2024