16,011,358 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by jk0391 (Top 44 by date)
jk0391
29-May-15 11:52am
View
A description would help us.
jk0391
29-May-15 11:28am
View
Try doing a search on Google.
jk0391
29-May-15 11:27am
View
Use google.
jk0391
29-May-15 11:26am
View
We don't give you code. Give this a try and if you come across any problems then you may post a question but this "question" is not valid.
Use Google!
jk0391
28-May-15 15:29pm
View
Post your code, how do you expect anyone to help you?
jk0391
28-May-15 15:27pm
View
Post your entire code snippet you've tried. You are telling us you have this "if" case and that "if" case but it is not provided...
jk0391
28-May-15 15:25pm
View
Please re-word your question and also provide actual code you have tried that does not work.
jk0391
27-May-15 15:51pm
View
You should be using the WorkSheet variable, not the Excel object.
ws.Cells(row, column) = "value";
Right??
jk0391
27-May-15 15:47pm
View
But he's asking here...
jk0391
16-May-15 9:35am
View
No worries, you can simply create the application and put it there. No need for configuring Windows Services.
When you turn the computer on and login to Windows, the program will automatically run.
jk0391
15-May-15 13:49pm
View
Use google. This is not even a valid question for this site.
jk0391
15-May-15 9:28am
View
Where is the code you have tried? Best to use google if you are looking for something already done.
jk0391
15-May-15 9:28am
View
Where is your code?
jk0391
15-May-15 9:27am
View
www.google.com
jk0391
15-May-15 9:27am
View
Shouldn't you be calling xlWorkbook.SaveAs?
jk0391
12-May-15 15:57pm
View
Hey now, VB6 is a very powerful language. Although I prefer .NET now, VB6 is still amazing to make quick and easy applications.
jk0391
21-Apr-15 15:45pm
View
As mentioned above, there are libraries you can use. If you want to really dive into this topic, I suggest learning how to manipulate the image. Load into memory/picturebox and scan each pixel, look for a face pattern.
jk0391
21-Apr-15 9:10am
View
Double click the textbox (in design view) to generate an onclick event where you can put code that will execute whenever you interact with the textbox.
jk0391
16-Apr-15 14:11pm
View
Did you read the question?
"What I need is to extract username from string, without "|" characters"
Clearly there.
jk0391
8-Apr-15 13:39pm
View
Make sure you are handling the redirect properly.
jk0391
7-Apr-15 15:50pm
View
You are doing it wrong then. Try doing some research on how to properly use the CookieContainer class.
Or post some code for us to look at and help you debug, otherwise we cannot provide code.
jk0391
7-Apr-15 15:49pm
View
We don't provide code. Please come up with something and if you get stuck then we can help you debug?
jk0391
7-Apr-15 13:33pm
View
If you got it to work you should mark my first post as a solution to your problem. :)
jk0391
7-Apr-15 9:38am
View
Sorry but this is not something you ask here... Try google searching for tutorials, or even YouTube videos.
As for the product key, that is something you would implement in the back-end of the application (programming)
jk0391
7-Apr-15 9:32am
View
I recommend downloading "Live HTTP Headers", the add-on for FireFox. Before you click "search" on that webpage, open up the add-on to catch the request. After that you will see what is sent and you can use the code I provided to send the data, retrieve whatever it is/string you want to get.
You'll see the POST data towards the end of the request, take that and append it to the host connected by a "?", like so:
string HTML = wc.DownloadString(http://uk.rs-online.com/web/search.php?searchdata="example"&searchdata2="example");
jk0391
6-Apr-15 13:29pm
View
sw.Write("Try Try But Don't Cry".Replace("But", ""));
Try that line, it removes But, or modify to your liking...
You can also store that string in a string variable and make the following procedure: if (variable.Contains("But")) {}
jk0391
2-Apr-15 11:21am
View
What is the website you are trying to do this on? I can help.
jk0391
2-Apr-15 11:21am
View
Okay, then with my code you simply modify the URL to be:
The search function URL + post data being sent to do the search, then your response is stored in HTML where you can parse it to your liking.
If you don't know how to get the search POST data, use something like WireShark or Live HTTP Headers for Firefox to capture your request. :)
jk0391
31-Mar-15 15:53pm
View
This code can go into a button for all you care...
Sorry for the late reply, I don't check here often. And also if you looked at my code and don't understand that "URL" is basically the homepage link, then you need some more studying. :P
jk0391
4-Feb-15 14:16pm
View
Fredrik, thanks so much for making this project. Very interesting to trace and compare. I believe it will still not work as the line I have can be anywhere in space, whereas yours must always originate from (0,0,0) which is not dynamic. This is a great study, though as it will help me tackle the project later on in the future. For now I am taking care of other projects. :(
jk0391
3-Feb-15 9:30am
View
...and the picture you requested. Disregard the cube.
http://i58.tinypic.com/1zya8b4.png
jk0391
3-Feb-15 9:27am
View
Apologies for the delay. Here is my full code as I noticed it cut off before:
WPL.GetDefault()
WPL.CreateFromZAxis(PickObj.PickedPoint, WPL.ZAxis)
WPL.WorkPlaneWorld(mwp, mpw)
If WPL.LastError <> V_NOERROR Then
MsgBox(WPL.LastError)
Exit Sub
End If
Dim p As New VISIPoint
Dim pick As New VISIPick
p.Put(0, 0, 0)
pick.VectorPoint = p
pick.Filter = SEARCH_DIRECTION
pick.MoreElements = False
If (pick.Pick() = False) Then
pick.ClearSelection()
Exit Sub
End If
pick.ClearSelection()
'Display existence of workplane
lblDebug.Text = "(" & WPL.Origin.X.ToString() & "," & WPL.Origin.Y.ToString() & "," & WPL.Origin.Z.ToString() & ")" & vbNewLine & _
WPL.XAxis.CX.ToString() & " " & WPL.XAxis.CY.ToString() & " " & WPL.XAxis.CZ.ToString() & vbNewLine & _
" " & WPL.YAxis.CX.ToString() & " " & WPL.YAxis.CY.ToString() & " " & WPL.YAxis.CZ.ToString() & vbNewLine & _
" " & WPL.ZAxis.CX.ToString() & " " & WPL.ZAxis.CY.ToString() & " " & WPL.ZAxis.CZ.ToString()
Dim x, y, z, rad, deg As Double
x = db.WorkElement.EndPoint.X - db.WorkElement.StartPoint.X
y = db.WorkElement.EndPoint.Y - db.WorkElement.StartPoint.Y
z = db.WorkElement.EndPoint.Z - db.WorkElement.StartPoint.Z
rad = (Math.Asin(z / Math.Sqrt((x ^ 2) + (y ^ 2) + (z ^ 2)))).ToString()
deg = (rad * (180 / Math.PI)).ToString()
'WPL = Util.rotateWorkPlane(WPL, deg)
If (deg > 0) Then
vPoint.Put(db.WorkElement.StartPoint.X, db.WorkElement.StartPoint.Y, db.WorkElement.StartPoint.Z)
Else
vPoint.Put(db.WorkElement.EndPoint.X, db.WorkElement.EndPoint.Y, db.WorkElement.EndPoint.Z)
End If
lblDeg.Text = deg.ToString()
Dim redLine As New Vector3D(x, y, z)
redLine.Normalize()
Dim vectorD As New Vector3D(0, 1, 0)
Dim crossP As New Vector3D()
Dim angle As Double
angle = Math.Acos(Vector3D.DotProduct(redLine, vectorD))
angle = angle * (180 / Math.PI)
crossP = Vector3D.CrossProduct(redLine, vectorD)
'--
'Dim v1 As New Vector3D(db.WorkElement.EndPoint.X, db.WorkElement.EndPoint.Y, db.WorkElement.EndPoint.Z)
'Dim v2 As New Vector3D(db.WorkElement.StartPoint.X, db.WorkElement.StartPoint.Y, db.WorkElement.StartPoint.Z)
'MsgBox(Vector3D.AngleBetween(v1, v2))
'--
'crossP = Vector3D.CrossProduct(vectorD, vectorN)
'angleBetween = Vector3D.AngleBetween(vectorD, vectorN)
'WPL.ZAxis.CX = pick.PickedVector.CX
'WPL.ZAxis.CY = pick.PickedVector.CY
'WPL.ZAxis.CZ = pick.PickedVector.CZ
SolFac.CreateCylinder(0.006, db.WorkElement.Length, vPoint, WPL.XAxis, WPL.ZAxis)
vList.Init(10, LTYPE_BODY)
Axis.Put(crossP.X, crossP.Y, crossP.Z)
'Axis = Util.rotateVector(Axis, Axis, deg)
If SolFac.LastError <> V_NOERROR Then
MsgBox(SolFac.LastError)
Else
vList.AddItem(SolFac.Result)
mwp.SetRotate(Axis, vPoint, angle) 'rotate a body based off an angle
'matT.SetTranslate(vPoint, P2) ' move body from one point to another
'mwp.TransformVector(Axis)
'mwp.Mul(matR, matT) 'apply new changes
SolFac.WorkMatrix = mwp
SolFac.ApplyMatrix(vList)
'SolFac.RotateBodies(vList, Axis, vPoint, deg)
Appl.UpdateSolidsOnScreen()
End If
jk0391
30-Jan-15 13:55pm
View
Sorry I know you can't compile it to test it yourself, I was just asking you to go over it because you already traced my code before to post the solution you proposed. Can you not trace it? Again, thank you for your time.
jk0391
29-Jan-15 11:07am
View
Here is my code, see if it looks OK to you. Please ignore the commented code. Thank you again for helping me. I tried it and it did not work, I am thinking I need to adjust my CreateCylinder call (WPL axis values...)
Dim PickObj As New VISIPick
Dim FaceList As New VISIList
Dim db As New VISIDatabase
Dim OldElList As New VISIList
'* new var
Dim mwp, mpw, matT, matR As New VISIMatrix
Dim P2 As New VISIPoint
Dim Axis As New VISIVector
'---
'PickObj.Filter = SEARCH_SEGM
PickObj.Message = "Pick a Line"
'PickObj.MoreElements = True
If PickObj.Pick = False Then
Exit Sub
End If
'PickObj.ClearSelection()
FaceList.Init(5, LTYPE_FACE)
db.WorkDBKey = PickObj.PickedKey
db.GetElement()
'Make element variable compatible with workplane - add to list
'*FaceList.AddItem(db.WorkElement)
WPL.GetDefault()
WPL.CreateFromZAxis(PickObj.PickedPoint, WPL.ZAxis)
WPL.WorkPlaneWorld(mwp, mpw)
If WPL.LastError <> V_NOERROR Then
MsgBox(WPL.LastError)
Exit Sub
End If
Dim p As New VISIPoint
Dim pick As New VISIPick
p.Put(0, 0, 0)
pick.VectorPoint = p
pick.Filter = SEARCH_DIRECTION
pick.MoreElements = False
If (pick.Pick() = False) Then
pick.ClearSelection()
Exit Sub
End If
pick.ClearSelection()
'Display existence of workplane
lblDebug.Text = "(" & WPL.Origin.X.ToString() & "," & WPL.Origin.Y.ToString() & "," & WPL.Origin.Z.ToString() & ")" & vbNewLine & _
WPL.XAxis.CX.ToString() & " " & WPL.XAxis.CY.ToString() & " " & WPL.XAxis.CZ.ToString() & vbNewLine & _
" " & WPL.YAxis.CX.ToString() & " " & WPL.YAxis.CY.ToString() & " " & WPL.YAxis.CZ.ToString() & vbNewLine & _
" " & WPL.ZAxis.CX.ToString() & " " & WPL.ZAxis.CY.ToString() & " " & WPL.ZAxis.CZ.ToString()
Dim x, y, z, rad, deg As Double
x = db.WorkElement.EndPoint.X - db.WorkElement.StartPoint.X
y = db.WorkElement.EndPoint.Y - db.WorkElement.StartPoint.Y
z = db.WorkElement.EndPoint.Z - db.WorkElement.StartPoint.Z
rad = (Math.Asin(z / Math.Sqrt((x ^ 2) + (y ^ 2) + (z ^ 2)))).ToString()
deg = (rad * (180 / Math.PI)).ToString()
'WPL = Util.rotateWorkPlane(WPL, deg)
If (deg > 0) Then
vPoint.Put(db.WorkElement.StartPoint.X, db.WorkElement.StartPoint.Y, db.WorkElement.StartPoint.Z)
Else
vPoint.Put(db.WorkElement.EndPoint.X, db.WorkElement.EndPoint.Y, db.WorkElement.EndPoint.Z)
End If
lblDeg.Text = deg.ToString()
Dim redLine As New Vector3D(x, y, z)
redLine.Normalize()
Dim vectorD As New Vector3D(0, 1, 0)
Dim crossP As New Vector3D()
Dim angle As Double
angle = Math.Acos(Vector3D.DotProduct(redLine, vectorD))
angle = (angle * (180 / Math.PI))
crossP = Vector3D.CrossProduct(redLine, vectorD)
'--
'Dim v1 As New Vector3D(db.WorkElement.EndPoint.X, db.WorkElement.EndPoint.Y, db.WorkElement.EndPoint.Z)
'Dim v2 As New Vector3D(db.WorkElement.StartPoint.X, db.WorkElement.StartPoint.Y, db.WorkElement.StartPoint.Z)
'MsgBox(Vector3D.AngleBetween(v1, v2))
'--
'crossP = Vector3D.CrossProduct(vectorD, vectorN)
'angleBetween = Vector3D.AngleBetween(vectorD, vectorN)
'WPL.ZAxis.CX = pick.PickedVector.CX
'WPL.ZAxis.CY = pick.PickedVector.CY
'WPL.ZAxis.CZ = pick.PickedVector.CZ
SolFac.CreateCylinder(0.006, db.WorkElement.Length, vPoint, WPL.XAxis, WPL.ZAxis)
vList.Init(10, LTYPE_BODY)
Axis.Put(crossP.X, crossP.Y, crossP.Z)
'Axis = Util
jk0391
29-Jan-15 9:33am
View
Hard to follow with what you said, would you able to simplify this, possibly providing a formula with what I am working with? Thank you so much for replying.
jk0391
28-Jan-15 16:00pm
View
Hi, thanks for your reply. The line cannot be moved/rotated. The cylinder is what I am positioning so it is exactly aligned around the line in space. Perhaps trying to trace my code will give you the numbers/values you are looking for?
jk0391
28-Jan-15 13:30pm
View
Sorry, I meant to say CYLINDER and not SPHERE. My mistake there. I updated the question. Basically, I need to generate this cylinder so it wraps around the line, the line being exactly in the center.
jk0391
27-Jan-15 11:34am
View
Perhaps you might know the answer to my next question:
http://www.codeproject.com/Questions/870050/Determine-true-Axis-of-object-D-environment?arn=0
jk0391
27-Jan-15 11:30am
View
http://stackoverflow.com/questions/28050682/determine-angle-of-a-straight-line-in-3d-space
jk0391
27-Jan-15 11:07am
View
I have solved this problem as someone was able to figure it out from the information I provided. Solution is posted. :)
jk0391
27-Jan-15 10:49am
View
Maybe you should read the post as I have given enough detail in there and not just my title. :) Someone was able to assist me with the exact same wording on another site.
jk0391
20-Jan-15 13:38pm
View
It's more complicated than that. You also don't have to be rude.
jk0391
20-Jan-15 12:55pm
View
Would you be able to help? I've been searching google for hours :(
jk0391
20-Jan-15 12:34pm
View
Well I'd like to get the proper code to execute the formula which at the same time I am trying to find.
Show More