Discuss and ask questions about CAD .NET library.
Moderators: SDS, support, admin
-
zebiya
- Posts: 27
- Joined: 14 Feb 2007, 22:45
- Location: Spain
Post
by zebiya » 03 Nov 2007, 23:03
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!!
-
zebiya
- Posts: 27
- Joined: 14 Feb 2007, 22:45
- Location: Spain
Post
by zebiya » 05 Nov 2007, 22:29
ÐŽPlease don't forget me!
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 06 Nov 2007, 12:16
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
-
zebiya
- Posts: 27
- Joined: 14 Feb 2007, 22:45
- Location: Spain
Post
by zebiya » 09 Nov 2007, 23:11
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!!!
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 12 Nov 2007, 09:45
Object Marker contains Point property. It returns coordinates of the marker.
Sergey.
Please post questions to the forum or write to
support@cadsofttools.com
-
zebiya
- Posts: 27
- Joined: 14 Feb 2007, 22:45
- Location: Spain
Post
by zebiya » 12 Nov 2007, 11:53
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
-
zebiya
- Posts: 27
- Joined: 14 Feb 2007, 22:45
- Location: Spain
Post
by zebiya » 13 Nov 2007, 10:21
Hello Sergey
I have already sent the mail. Please answer soon [;)]
Regards
Alfredo Chofre
-
zebiya
- Posts: 27
- Joined: 14 Feb 2007, 22:45
- Location: Spain
Post
by zebiya » 13 Nov 2007, 11:55
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
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 13 Nov 2007, 14:50
<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
-
zebiya
- Posts: 27
- Joined: 14 Feb 2007, 22:45
- Location: Spain
Post
by zebiya » 13 Nov 2007, 15:06
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!!!!
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 13 Nov 2007, 15:44
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
-
zebiya
- Posts: 27
- Joined: 14 Feb 2007, 22:45
- Location: Spain
Post
by zebiya » 13 Nov 2007, 16:14
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 [:)]
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 14 Nov 2007, 11:37
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