.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetFirst()???

7 REPLIES 7
Reply
Message 1 of 8
Nawara17
443 Views, 7 Replies

GetFirst()???

Hi all,
Please can anybody help.
Where can i find getFirst method, it belongs to what(Autodesk.AutoCAD.What??) ??

coz I am creating my own command that when i double click on a block it will do the following:

[Autodesk.AutoCAD.Runtime.CommandMethod("Details",CommandFlags.UsePickSet)]
public void BlockInfo()
{

Document activeDoc = AcadAPP.DocumentManager.MdiActiveDocument;
PromptSelectionResult res = activeDoc.Editor.SelectImplied();
if (res.Status != PromptStatus.OK)
{
MessageBox.Show("No Objects selected.");
return;
}
if (res.Value.Count != 1)
{
MessageBox.Show("More than one object is selected. \nPlease, select only one object.");
return;
}
ObjectId id=res.Value[0].ObjectId;
......
}

but the problem with that code is activeDoc.Editor.SelectImplied();

it always gives 0 objects selected.

i found in http://www.codeproject.com/useritems/arxref.asp a help document that had this Info:

UsePickSet: When the pickfirst set is retrieved, it is cleared within AutoCAD.Command is able to retrieve the pickfirst set via the method Getfirst().

but I don't know how can i get this method in which library??

thanks in advance 🙂

Noora
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Nawara17


Use the "Object Browser".

Try this:
Editor ed = Autodesk.AutoCAD.ApplicationServices.
Application.DocumentManager.MdiActiveDocument.Editor;

wrote in message news:5270942@discussion.autodesk.com...
Hi all,
Please can anybody help.
, it belongs to what(Autodesk.AutoCAD.What??) ??

coz I am creating my own command that when i double click on a block it will
do the following:

[Autodesk.AutoCAD.Runtime.CommandMethod("Details",CommandFlags.UsePickSet)]
public void BlockInfo()
{

Document activeDoc = AcadAPP.DocumentManager.MdiActiveDocument;
PromptSelectionResult res = activeDoc.Editor.SelectImplied();
if (res.Status != PromptStatus.OK)
{
MessageBox.Show("No Objects selected.");
return;
}
if (res.Value.Count != 1)
{
MessageBox.Show("More than one object is selected. \nPlease, select only one
object.");
return;
}
ObjectId id=res.Value[0].ObjectId;
......
}

but the problem with that code is activeDoc.Editor.SelectImplied();

it always gives 0 objects selected.

i found in http://www.codeproject.com/useritems/arxref.asp a help document
that had this Info:

UsePickSet: When the pickfirst set is retrieved, it is cleared within
AutoCAD.Command is able to retrieve the pickfirst set via the method
Getfirst().

but I don't know how can i get this method in which library??

thanks in advance 🙂

Noora
Message 3 of 8
Nawara17
in reply to: Nawara17

hello Paul,
Please, Can you answer my question??
Message 4 of 8
Anonymous
in reply to: Nawara17

What question do you want answered? When I am looking
for info I use the "Object Browser". You can filter just the
Acad managed libraries, and then use the search box. For
docs you must use the native ones in the ARX sdk.

Did you try the way I said? It works for me, but I'm still
finding my way too.

[code]
Editor ed = Autodesk.AutoCAD.ApplicationServices.
Application.DocumentManager.MdiActiveDocument.Editor;

PromptSelectionResult psr = ed.SelectImplied();
[/code]

wrote in message news:5270994@discussion.autodesk.com...
hello Paul,
Can you answer my question??
Message 5 of 8
Nawara17
in reply to: Nawara17

thanks alot pual for your answer.

i have another question. can i use selecImplied() for blockreference?

what i want to say is double clicking on a block refernce invokes eattedit without highlighting the block.
I redefined eattedit command, but selectImplied() always gives me 0 object selected. i think becuase of unhighlighting the block while double clicking it. is that right?

how can i solve this problem? please,anyone can help
Message 6 of 8
Anonymous
in reply to: Nawara17

Sorry I missed the doubleclick part.
You can set Double Click Action in 07 via the CUI.
Also check out "DoubleClickAction" in the arxref.chm,
and the cui sample in the sdk.

Pre-07 you can do this using acdbdoubleclickedit in
native ARX. I don't know about managed. If it's
possible someone else should chime in.

wrote in message news:5271003@discussion.autodesk.com...
thanks alot pual for your answer.

i have another question. can i use selecImplied() for blockreference?

what i want to say is double clicking on a block refernce invokes eattedit
without highlighting the block.
I redefined eattedit command, but selectImplied() always gives me 0 object
selected. i think becuase of unhighlighting the block while double clicking
it. is that right?

how can i solve this problem? please,anyone can help
Message 7 of 8
Nawara17
in reply to: Nawara17

thanks pual. i'll search for that and i'll post what i find 🙂
Message 8 of 8
Anonymous
in reply to: Nawara17


Meant the managed ones in the ARX sdk. Althought the
native ones help too.

"Paul Richardson" wrote in message
news:5271025@discussion.autodesk.com...
What question do you want answered? When I am looking
for info I use the "Object Browser". You can filter just the
Acad managed libraries, and then use the search box. For
docs you must use the native ones in the ARX sdk.

Did you try the way I said? It works for me, but I'm still
finding my way too.

[code]
Editor ed = Autodesk.AutoCAD.ApplicationServices.
Application.DocumentManager.MdiActiveDocument.Editor;

PromptSelectionResult psr = ed.SelectImplied();
[/code]

wrote in message news:5270994@discussion.autodesk.com...
hello Paul,
Can you answer my question??

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost