Turn off selection mode

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
fbroma
Posts: 11
Joined: 24 Nov 2006, 05:11

Turn off selection mode

Post by fbroma » 28 Dec 2006, 09:14

Hi Sergey,

Just recently purchased CADImportVCL and find it useful. However, I have a question regarding the Editor demo: is there a way to turn off the selection mode once mmSelect or mmMultiSelect has been implemented?

Thanks in advance,

Hike

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 28 Dec 2006, 14:25

Hello Hike,

Just find in the module <b>sgSManager.pas</b> procedure TsgSelectionManager.ClearSelection;

It is used for turning off the selection mode.

Sergey.

please post questions to the forum or write to support@cadsofttools.com

fbroma
Posts: 11
Joined: 24 Nov 2006, 05:11

Post by fbroma » 28 Dec 2006, 20:06

Hi Sergey,

Thanks for the quick response. I've tried this and couldn't get it to work.

What I want to be able to do is toggle selection mode on and off with a button (similar to snap) so when I click on an entity it does not select it if selection mode is off.

Thanks,

Hike

fbroma
Posts: 11
Joined: 24 Nov 2006, 05:11

Post by fbroma » 28 Dec 2006, 20:20

Hi Sergey,

To clarify, I've been trying to put both snap and select modes using buttons. I can get it to select but when I turn on snap and I can't get selection mode turned off.

Thanks,

Hike

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 29 Dec 2006, 11:29

Hello Hike,

We thought there was no need to have <b>Unselect mode</b> button in the <b>Editor</b> demo. That is why we did not add it.

Nevertheless if you need it, it is necessary to add new selecting mode - <b>mmNone</b>:

Code: Select all

  TsgManagerMode = (mmNone, mmSelect, mmMultiSelect); 
and new button:

Code: Select all

<b>procedure</b> TfmMain.BtnUnSelectClick(Sender: TObject);
<b>begin</b>
  sgImage.Cursor := crArrow;
  FManager.Mode := mmNone;
  btnUnSelect.Down := True;
  btnSelect.Down := False;
  btnMSelect.Down := False;
<b>end</b>;
and to add the following line when switching the other selecting modes:

Code: Select all

  btnUnSelect.Down := False;
Sergey.


please post questions to the forum or write to support@cadsofttools.com

fbroma
Posts: 11
Joined: 24 Nov 2006, 05:11

Post by fbroma » 29 Dec 2006, 19:48

Hi Sergey,

Thanks. I tried this but still having the same problem. I put the selection functions from Editor into Viewer demo. Selection mode works (i can toggle off/on) but I can't get snap mode to work when selection mode is off or on.

procedure TForm1.sbSnapClick(Sender: TObject);
begin
FManager.DeselectAll;
FManager.Mode := mmNone;

sbRoofSelect.Down := false;
sbSnap.Down := true;
miSnap.Checked := not miSnap.Checked;
CreateSnapObject;
SnapMode := osAll;
sgImage1.cursor := crCross;
end;

Your help would be appreciated.

Thanks again,

Hike

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 05 Jan 2007, 10:05

Hello Hike,

If possible, please send us your project to support@cadsofttools.com. The matter is that it is extremely difficult to find a reason of the problem "reading tea leaves". Basically Viewer has no selection and Editor has no snap. And it is elementary that our realisation will differ from yours. That is why we need to see your code.

Sergey.


Please post questions to the forum or write to support@cadsofttools.com

Post Reply