if I call "GetEntity" from COMMAND-LINE it's work
but from pallette - button not so good.
//----------------------------------------------------
[CommandMethod("GetEntity")]
public static void GetEntity()
{
Document activeDoc = Application.DocumentManager.MdiActiveDocument;
Database database = activeDoc.Database;
Editor editor = activeDoc.Editor;
var result = editor.GetEntity("\nEntity");
editor.WriteMessage("\n" + result.ToString());
}
//----------------------------------------------------
Re: editor.GetEntity from Palette (session mode)
#2May you should try something like this:
Code: Select all
Dim objDocument As Document = Application.DocumentManager.MdiActiveDocument
Dim objEditor As Editor = objDocument.Editor
Dim objOptions As PromptSelectionOptions = New PromptSelectionOptions()
objOptions.MessageForAdding = vbLf & "Select lines: "
Dim objSelectionFilter As SelectionFilter = New SelectionFilter(New TypedValue(0) {New TypedValue(CInt(DxfCode.Start), "LINE")})
Dim objSelectionResult As PromptSelectionResult = objEditor.GetSelection(objOptions, objSelectionFilter)
If objSelectionResult.Status <> PromptStatus.OK Then
Return
End If
[ ... ]
Re: editor.GetEntity from Palette (session mode)
#3Hi RaHo,RaHo wrote: ↑Mon Jun 07, 2021 8:49 amif I call "GetEntity" from COMMAND-LINE it's work
but from pallette - button not so good.
//----------------------------------------------------
[CommandMethod("GetEntity")]
public static void GetEntity()
{
Document activeDoc = Application.DocumentManager.MdiActiveDocument;
Database database = activeDoc.Database;
Editor editor = activeDoc.Editor;
var result = editor.GetEntity("\nEntity");
editor.WriteMessage("\n" + result.ToString());
}
//----------------------------------------------------
Can you show more detail about "not good"?
Re: editor.GetEntity from Palette (session mode)
#4IntelliCad 11.1 tested:
Cursor become a rectangle like original,
but then it is always there.
If I give the command "line" cursor get crosshair,
when ending cursor become a rectangle again.
From palette grafic ist preview selected
from command line not.
Cursor become a rectangle like original,
but then it is always there.
If I give the command "line" cursor get crosshair,
when ending cursor become a rectangle again.
From palette grafic ist preview selected
from command line not.