Using SelectExt in non-"Model" layout
Moderators: SDS, support, admin
-
- Posts: 26
- Joined: 17 Oct 2007, 06:46
- Location: Malaysia
- Contact:
Using SelectExt in non-"Model" layout
Does anybody notice that SelectExt method does not work on other layouts except the default Model layout. When I open a CAD file using the CAD Import Viewer with Model layout selected, I can use the Selection tool to select the entities in the CAD file. But when other layout is selected, no entities can be selected using the Selection tool.
I am not sure whether this is a bug or an intentional behavior? If it is intentional, I wonder what is the rationale behind it as it does not make any sense to me.
Does anyone encounter this before or has any idea about this? Thanks!
<b>Objective World Pvt. Ltd.</b>
"<i>Turning Knowledge Into Wisdom.</i>"
http://www.objectiveworld.com
I am not sure whether this is a bug or an intentional behavior? If it is intentional, I wonder what is the rationale behind it as it does not make any sense to me.
Does anyone encounter this before or has any idea about this? Thanks!
<b>Objective World Pvt. Ltd.</b>
"<i>Turning Knowledge Into Wisdom.</i>"
http://www.objectiveworld.com
Hi!
Method SelectExt works no matter whether model or any layout is selected. The following code demonstrates it:
<ol type="1">
<li>Put a listBox on the form of Viewer demo.</li>
<li>Add the following code in to cadPictBox_MouseUp:</li></ol id="1">
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
Method SelectExt works no matter whether model or any layout is selected. The following code demonstrates it:
<ol type="1">
<li>Put a listBox on the form of Viewer demo.</li>
<li>Add the following code in to cadPictBox_MouseUp:
Code: Select all
<font color="blue">private void</font id="blue"> cadPictBox_MouseUp(<font color="blue">object</font id="blue"> sender, System.Windows.Forms.MouseEventArgs e)
{
...
<font color="blue">this</font id="blue">.cadImage.UseDoubleBuffering = <font color="blue">false</font id="blue">;
<font color="blue">this</font id="blue">.cadImage.SelectionMode = CADImport.SelectionEntityMode.Enabled;
CADEntity ent = (CADEntity) <font color="blue">this</font id="blue">.cadImage.SelectExt(e.X,e.Y, <font color="blue">true</font id="blue">,<font color="blue">true</font id="blue">);
<font color="blue">if</font id="blue"> (ent != <font color="blue">null</font id="blue">)
{
listBox1.Items.Clear();
listBox1.Items.Add(ent.EntName);
}
cadPictBox.Invalidate();
...
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
-
- Posts: 26
- Joined: 17 Oct 2007, 06:46
- Location: Malaysia
- Contact:
Hi Sergey,
Thanks for your quick response. Had tried amending the Viewer with your code above. Unfortunately, no luck at all. I had emailed you earlier a DXF file for verfiying this problem yourself. I am going to email you another DXF file that is VERY VERY basic but with multiple layouts. You will notice that the SelectExt works normally in Model layout, but not other layouts.
<b>Objective World Pvt. Ltd.</b>
"<i>Turning Knowledge Into Wisdom.</i>"
http://www.objectiveworld.com
Thanks for your quick response. Had tried amending the Viewer with your code above. Unfortunately, no luck at all. I had emailed you earlier a DXF file for verfiying this problem yourself. I am going to email you another DXF file that is VERY VERY basic but with multiple layouts. You will notice that the SelectExt works normally in Model layout, but not other layouts.
<b>Objective World Pvt. Ltd.</b>
"<i>Turning Knowledge Into Wisdom.</i>"
http://www.objectiveworld.com
Hi Thomas,
We tested your files. Both of them contain ViewPorts on layouts. That is why non of entities can be selected except ViewPort itself. AutoCAD does the same.
Sergey
Please post questions to the forum or write to support@cadsofttools.com
We tested your files. Both of them contain ViewPorts on layouts. That is why non of entities can be selected except ViewPort itself. AutoCAD does the same.
Sergey
Please post questions to the forum or write to support@cadsofttools.com