Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
.NET
»
Topic:
How do i get selectionset with a specific name?
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: How do i get selectionset with a specific name? (Read 2287 times)
0 Members and 1 Guest are viewing this topic.
Rusel
Guest
How do i get selectionset with a specific name?
«
on:
June 01, 2014, 09:21:30 PM »
Hello,
I am new to .net and used vba for years.
In vba I was creating a selectionset with a name in a sub and able to get it somewhere else with its name and use it like:
Dim Sset As SelectionSet = doc.SelectionSets.Item("myselectionset")
How can I do this in .net?
Thanks,
Logged
Gasty
Newt
Posts: 90
Re: How do i get selectionset with a specific name?
«
Reply #1 on:
June 01, 2014, 11:30:08 PM »
Hi,
Why do you need a name?, the managed API selection set class hasn't a name property for an instance of a selection set. You have a variable which contains the selection set, that's it.
Gaston Nunez
Logged
WILL HATCH
Bull Frog
Posts: 450
Re: How do i get selectionset with a specific name?
«
Reply #2 on:
June 02, 2014, 01:27:09 AM »
You'd need to create an object to hold all the selection sets, if you don't need this defined outside of the current document scope then just add a dictionary to your command class. If you need it shared across documents then declare it static.
Code - C#:
[Select]
public
Commands
{
Dictionary
<
string
, SelectionSet
>
SelectionSets
=
new
Dictionary
<
string
, SelectionSet
>
(
)
;
public
void
DoStuff
(
)
{
~~~
SelectionSet ss
=
ed
.
GetSelection
(
)
;
SelectionSets
.
add
(
"DoStuffSet"
,ss
)
;
~~~
}
public
void
DoThings
(
)
{
~~~
SelectionSet ss
=
SelectionSets
[
"DoStuffSet"
]
;
~~~
}
}
Logged
Rusel
Guest
Re: How do i get selectionset with a specific name?
«
Reply #3 on:
June 02, 2014, 10:03:54 PM »
Thanks,
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
.NET
»
Topic:
How do i get selectionset with a specific name?