.NET

Reply
Valued Contributor
Nawara17
Posts: 52
Registered: ‎03-27-2006
Message 1 of 8 (113 Views)

GetFirst()???

113 Views, 7 Replies
08-16-2006 03:56 PM
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 :smileyhappy:

Noora
*Paul Richardson
Message 2 of 8 (113 Views)

Re: GetFirst()???

08-16-2006 05:12 PM 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 :smileyhappy:

Noora
Valued Contributor
Nawara17
Posts: 52
Registered: ‎03-27-2006
Message 3 of 8 (113 Views)

Re: GetFirst()???

08-16-2006 06:23 PM in reply to: Nawara17
hello Paul,
Please, Can you answer my question??
*Paul Richardson
Message 4 of 8 (113 Views)

Re: GetFirst()???

08-16-2006 06:36 PM 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??
Valued Contributor
Nawara17
Posts: 52
Registered: ‎03-27-2006
Message 5 of 8 (113 Views)

Re: GetFirst()???

08-16-2006 07:42 PM 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
*Paul Richardson
Message 6 of 8 (113 Views)

Re: GetFirst()???

08-16-2006 08:27 PM 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
Valued Contributor
Nawara17
Posts: 52
Registered: ‎03-27-2006
Message 7 of 8 (113 Views)

Re: GetFirst()???

08-17-2006 07:38 AM in reply to: Nawara17
thanks pual. i'll search for that and i'll post what i find :smileyhappy:
*Paul Richardson
Message 8 of 8 (113 Views)

Re: GetFirst()???

08-17-2006 03:08 PM 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??
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.