I run this code, but got some error
I run this code, but got some error
(OP)
nx 8.5 + office 2013 pro 32bit
as you mentioned ms access 32bit cannot talk to NX 8.5, so i want to try excel and i found a post where you posted some code to write excel file using journal:
http://www.eng-tips.com/viewthread.cfm?qid=311938
after i run the code, the following error occurs:
server busy
the action cannot be completed because the other program is busy. choose "Switch" to activate the busy program and connect the problem........
what happen??
also, in that post, you said that:
you can access Excel as per the following code, but you lose the 'autocomplete' feature of visual studio. If you go this route, you may want to keep an instance of Excel running so you can reference the object model.
how do you keep an instance of Excel running?
thank you
as you mentioned ms access 32bit cannot talk to NX 8.5, so i want to try excel and i found a post where you posted some code to write excel file using journal:
http://www.eng-tips.com/viewthread.cfm?qid=311938
after i run the code, the following error occurs:
server busy
the action cannot be completed because the other program is busy. choose "Switch" to activate the busy program and connect the problem........
what happen??
also, in that post, you said that:
you can access Excel as per the following code, but you lose the 'autocomplete' feature of visual studio. If you go this route, you may want to keep an instance of Excel running so you can reference the object model.
how do you keep an instance of Excel running?
thank you





RE: I run this code, but got some error
I should have been more clear with my "keep an instace of Excel running" comment. By that I simply meant that you may want to keep Excel open while programming your journal. This way you can record a macro in Excel and quickly see what objects, properties, and methods you can use to accomplish the task. Also, the Excel code may be interspersed with Excel constants such as Direction.xlUp; most of these are enumerations in Excel. Using the Excel object browser (easy to get to if you have Excel open), you can find the numerical value of the constant and enter it in your journal code for the same effect.
www.nxjournaling.com
RE: I run this code, but got some error
since i am now trying to use to loop through notes on drawing. and you know that notes are scattered everywhere on drawin.
what will be the best way to identify note so that they can match with "something" in Excel and then if matched, the content of note can be updated.
when i do the tolerance looping through task, i use AppendedTest to identify each dimension, but now looks like note is headache....
RE: I run this code, but got some error
i write something like this
For Each note As Note In displayPart.Notes
by writting:
note.tostring
it will return the ID of the note like this: Note 98483
RE: I run this code, but got some error
note.ToString
to
note.Tag.ToString
If the numbers returned are the same, then the .ToString method is returning the tag number of the note. The Tag property is NOT guaranteed to remain the same from session to session (i.e. the tag number you see today may not be the same tag number you see when you close and reopen the part).
www.nxjournaling.com
RE: I run this code, but got some error
is there any other alternative solution?
RE: I run this code, but got some error
right click on notes, property, then in the General tab, give a name in the Name textbox.
in the code write something like
if note.getname() = "fsdfsade"
then...
RE: I run this code, but got some error
www.nxjournaling.com
RE: I run this code, but got some error
so, what's the benefit for using attribute? will there be a dramatic code change?
I saw lots of method and property under note such as note.getattributeType, AttributeInformation, etc, etc