Twullf
Mechanical
- Jan 24, 2012
- 196
Multiple problems with this code, hoping someone can help with two of them.
First reading a file where I want to get two strings and three double.
I receive the error: "'Parse' is not a member of 'String'"
I cannot seem to find the call out for reading a string from a file.
Second problem, I need to then place the strings on the drawing sheet as a note.
The error I receive for this is: "Value of type 'String' cannot be converted to '1-dimensional array of String'
Documentation of the creatNote callout read:
public void CreateNote(
int num_lines_text,
string[] text_string,
double[] origin_3d,
int orientation,
out Tag note_tag
)
Where orientation 0 means horizontal and 1 means vertical.
Any help would be greatly appreciated.
First reading a file where I want to get two strings and three double.
Code:
line = sr.ReadLine()
While Not line is Nothing
Dim pt1 As Point3d
Dim pt2 As Point3d
Dim noteLoc(2) as Double
Dim douX1Loc as Double
Dim douX2Loc as Double
Dim strLayer as String
Dim strMaterial as String
Dim douRotation as Double
Dim strRotate as String
Dim delim As Char () = { ","C }
Dim strings As String () = line.Split(delim)
strLayer = String.Parse(strings(0))
strMaterial = String.Parse(strings(1))
douRotation = Double.Parse(strings(2))
douX1Loc = Double.Parse(strings(3))
douX2Loc = Double.Parse(strings(4))
I cannot seem to find the call out for reading a string from a file.
Second problem, I need to then place the strings on the drawing sheet as a note.
Code:
ufs.Drf.CreateNote(1,strLayer, noteLoc, 0, theNote)
noteLoc(0) = x + 30
ufs.Drf.CreateNote(1,strMaterial, noteLoc, 0, theNote)
noteLoc(0) = x + 65
strRotate = douRotation + "<$s>"
ufs.Drf.CreateNote(1,strRotate, noteLoc, 0, theNote)
The error I receive for this is: "Value of type 'String' cannot be converted to '1-dimensional array of String'
Documentation of the creatNote callout read:
public void CreateNote(
int num_lines_text,
string[] text_string,
double[] origin_3d,
int orientation,
out Tag note_tag
)
Where orientation 0 means horizontal and 1 means vertical.
Any help would be greatly appreciated.