Page 1 of 2

Osnap feature

Posted: 03 Nov 2007, 23:03
by zebiya
Hi, I am managing with "OSNAP" feature. Ñ—How can I retrieve the highlighted point in a selected entity?

I am using the following code in my cadpictbox_mousemove method

Code: Select all

If Me.OSNAPMode Then
   Me.SelEnt = Me.FCADImage.SelectExt(e.X, e.Y)
   If Not (SelEnt Is Nothing) Then
      SelEnt.Selected = False
      FCADImage.ClearMarkers()
      FCADImage.InvalidateSelectEntity(cadPictBox, Me.scl)
   End If
   End If
Thanks!!

Posted: 05 Nov 2007, 22:29
by zebiya
ÐŽPlease don't forget me!

Posted: 06 Nov 2007, 12:16
by support
Hello Zebiya,

Please try the following code:

Code: Select all

<font color="blue">Private Sub</font id="blue"> btnGetCurMarker_Click(<font color="blue">ByVal</font id="blue"> sender <font color="blue">As</font id="blue"> System.Object, <font color="blue">ByVal</font id="blue"> e <font color="blue">As</font id="blue"> System.EventArgs) <font color="blue">Handles</font id="blue"> btnGetCurMarker.Click
    <font color="blue">Dim</font id="blue"> curMarker <font color="blue">As</font id="blue"> CADImport.Professional.Marker
    <font color="blue">If Not</font id="blue"> (<font color="blue">Me</font id="blue">.FCADImage.CurrentMarker <font color="blue">Is Nothing</font id="blue">) <font color="blue">Then</font id="blue">
        curMarker = <font color="blue">Me</font id="blue">.FCADImage.CurrentMarker()
        <font color="green">'Implement necessary actions</font id="green">
    <font color="blue">End If
End Sub</font id="blue">
Sergey.

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

Posted: 09 Nov 2007, 23:11
by zebiya
OK, OK... but what I want is the point!!! the marker is quite cool but I need coordinates [:)]

I cannot manage to get coordinates from that marker object.

Please tell me something, it is quite urgent for me.

Thanks a lot!!!

Posted: 12 Nov 2007, 09:45
by support
Object Marker contains Point property. It returns coordinates of the marker.

Sergey.

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

Posted: 12 Nov 2007, 11:53
by zebiya
In the version I have got, object MarKer has just the "Selected" property, and the methods "Equals" "GetHashCode" "GetType" "Paint" "ReferenceEquals" and "ToString"

Maybe I haven't got the latest version, mine has date of 28/06/2007 Ñ—Could you please tell me? Thanks Sergey

Posted: 12 Nov 2007, 16:25
by support
Please contact us to info@cadsofttools.com on the question of getting updates. Please make a reference to this topic in the e-mail.

Sergey.

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

Posted: 13 Nov 2007, 10:21
by zebiya
Hello Sergey

I have already sent the mail. Please answer soon [;)]

Regards

Alfredo Chofre

Posted: 13 Nov 2007, 11:07
by support
Hello Alfredo,

We have sent you respective e-mail.

Sergey.

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

Posted: 13 Nov 2007, 11:55
by zebiya
Thank you Sergey. now the Marker Object has gor the "Point" property.

The problem is than I cannot see the markers! the FCADImage.CurrentMarker is always "Nothing"

I use this code inside my MouseMove handler:

Code: Select all

            
If Me.ModoREFENT Then
   Me.SelEnt = Me.FCADImage.SelectExt(e.X, e.Y, True, True)
   If Not (SelEnt Is Nothing) Then
      Dim curMarker As CADImport.Professional.Marker
      If Not (Me.FCADImage.CurrentMarker Is Nothing) Then
         curMarker = Me.FCADImage.CurrentMarker
         Me.stBar.Panels.Item(2).Text = String.Concat(New Object() {"X OSNAP!!!: ", curMarker.Point.X})
      End If

   End If
   'FCADImage.ClearMarkers()
   'FCADImage.InvalidateSelectEntity(cadPictBox, Me.scl)
   Me.cadPictBox.Invalidate()
End If

Posted: 13 Nov 2007, 14:50
by support
<b>CurrentMarker</b> object will be created only when mouse cursor is over some knot of an entity and Select (or SelectExt) is called.

The following code works inside of cadPictBox_MouseMove (an entity is selected at first):

Code: Select all

<font color="blue">Dim</font id="blue"> curMarker <font color="blue">As</font id="blue"> CADImport.Professional.Marker
<font color="blue">If</font id="blue"> (<font color="blue">Me</font id="blue">.FCADImage <font color="blue">Is Nothing</font id="blue">) <font color="blue"> Then Return
If Not</font id="blue"> (<font color="blue">Me</font id="blue">.FCADImage.CurrentMarker <font color="blue">Is Nothing</font id="blue">) <font color="blue">Then</font id="blue">
    curMarker = <font color="blue">Me</font id="blue">.FCADImage.CurrentMarker
    ListBox1.Items.Clear()
    ListBox1.Items.Add(curMarker.Point.X.ToString())
<font color="blue">End If</font id="blue">
Sergey.

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

Posted: 13 Nov 2007, 15:06
by zebiya
Thanks Sergey, but whe I select any entity (lines, polylines,...) I cannot see the "knots" you say.

In the previous version, entity was selected, changed its appearance (dashed linetype) and a yellow "knot" was shown in any vertex. a pink knot was "CurrentMarker" but it didn't have the "point" property.

Now, with this version, the entity is selected, changes its appearance to a dashed linetype,but the yellow knots simply don't appear [:(], nor the pink knot, so I cannot get any marker.

It seems all the markers have been "Turned Off" with new version!!!!

Posted: 13 Nov 2007, 15:44
by support
We plan to release CAD Import .NET in two versions: Professional and Standard. The most editting abilities will be assembled in the Editor demo of Professional version.

We suppose that you use Viewer demo. So the restriction appeared.

Sergey.

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

Posted: 13 Nov 2007, 16:14
by zebiya
Ok, but I made a whole project based on Viewer Demo Ñ—how can I remove that restriction?

In previous version I could see the knots. If the restriction is in terms of licensing for professional version or similar, we can talk about it, but at the moment I am stuck at this point and I need to finish this development. Please email me to <i>achofre@teleingenieros.net</i> as soon as possible.

Please give me a solution of any kind [:)]

Posted: 14 Nov 2007, 11:37
by support
Dear Zebiya,

In fact we gave you a library which did not exist. And it does not exist at the moment. It is just intermediate version which can be changed by oficial release.
We will contact you by e-mail.

Sergey.

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