Selection manager

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

Moderators: SDS, support, admin

Post Reply
prodriguezdlt
Posts: 49
Joined: 06 Feb 2008, 03:26
Location: Mexico

Selection manager

Post by prodriguezdlt » 19 Feb 2008, 21:50

HI, im using your sgselection manager, can u please tell me wich lines or how can i disable moving objects? thanks
Pavel

Everything is Posible!

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

Post by support » 20 Feb 2008, 12:45

Hello!

Please follow the instructions:
<ol type="1"><li>open unit sgSManager;</li>
<li>find procedure TsgSelectionManager.ImageMouseDown;</li>
<li>comment the following lines:

Code: Select all

  <b>if</b> (FEntities.Count > <font color="blue">0</font id="blue">) <b>and</b> (FMode <> mmMultiSelect) <b>then</b>
    FDraging := True;
</li></ol id="1">
Sergey.

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

prodriguezdlt
Posts: 49
Joined: 06 Feb 2008, 03:26
Location: Mexico

Post by prodriguezdlt » 27 Feb 2008, 12:45

Hi Again, when i select an object it draws on white squares the point's in that object, ok, but when i select a block entity it draws a full lined rectangule, ok, i know that this happens 'cause the block cant be selecteded that way (points), is there a way that when i select a block entity the sgmanager only draw a white square on each corner instead of the full rectangule from corner to corner?

i hope u can understand this, you know....my english its crappy

Thanks
Pavel

Everything is Posible!

prodriguezdlt
Posts: 49
Joined: 06 Feb 2008, 03:26
Location: Mexico

Post by prodriguezdlt » 27 Feb 2008, 12:47

I know that the drawing of the selected object its on sgmaners TsgSelectionManager.DrawSelection , but i just cant get to work what im asking you, thanks!

Everything is Posible!

prodriguezdlt
Posts: 49
Joined: 06 Feb 2008, 03:26
Location: Mexico

Post by prodriguezdlt » 27 Feb 2008, 13:11

i put on tsgselectionmanager.drawselection where the if condition is

vEnt is TsgDXFInsert then
vLeft := FImg.GetPoint(vEnt.Box.TopLeft);
vRight := FImg.GetPoint(vEnt.Box.BottomRight);
DrawMarker(vLeft);
DrawMarker(vRight);

And it does what i want! but, i cant get the top right corner and the bottom left corner.....

thanks

Everything is Posible!

prodriguezdlt
Posts: 49
Joined: 06 Feb 2008, 03:26
Location: Mexico

Post by prodriguezdlt » 27 Feb 2008, 13:24

thanks....i v'e already get it! see ya i did this:

vLeft := FImg.GetPoint(vEnt.Box.TopLeft);
vRight := FImg.GetPoint(vEnt.Box.BottomRight);
DrawMarker(vRight);
vRect.Top := vRight.Y + BoxSize;
vRect.Left := vLeft.X - BoxSize;
vRect.Bottom := vRight.Y - BoxSize;
vRect.Right := vLeft.X + BoxSize;
FDNavigator.Canvas.Rectangle(vRect.Left, vRect.Top, vRect.Right, vRect.Bottom);
DrawMarker(vLeft);
vRect.Top := vLeft.Y + BoxSize;
vRect.Bottom := vLeft.Y - BoxSize;
vRect.Left := vRight.X - BoxSize;
vRect.Right := vRight.X + BoxSize;
FDNavigator.Canvas.Rectangle(vRect.Left, vRect.Top, vRect.Right, vRect.Bottom);

Everything is Posible!

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

Post by support » 29 Feb 2008, 18:01

Well done!

Sergey.

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

Post Reply