Osnap feature
Moderators: SDS, support, admin
Osnap feature
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
Thanks!!
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
Hello Zebiya,
Please try the following code:
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
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">
Please post questions to the forum or write to support@cadsofttools.com
Object Marker contains Point property. It returns coordinates of the marker.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
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
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
Hello Alfredo,
We have sent you respective e-mail.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
We have sent you respective e-mail.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
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:
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
<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):
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
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">
Please post questions to the forum or write to support@cadsofttools.com
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!!!!
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!!!!
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
We suppose that you use Viewer demo. So the restriction appeared.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
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 [:)]
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 [:)]
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
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