Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic create text file

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
1582 Views, 2 Replies

iLogic create text file

Hi,

 

I'm creating a .txt file from iLogic, but in the end i creats a new line... And this is not allowed. i'm storing a file path and it cannot be used when it has a new line on the end using the read all command.

 

Is there a way to avoid the new line?

Is there a way to read only the first line?

 

Thanks

 

2 REPLIES 2
Message 2 of 3
VdVeek
in reply to: Anonymous

When you provide your iLogic code it's easier to help you. What line of code do you use to read the line?

Is it working for you if you use the ReadLine instead of the standard example of ReadToEnd?

 

Rob.

 

oRead = System.IO.File.OpenText(ThisDoc.PathAndFileName(False) & ".txt")
EntireFile = oRead.ReadLine()
Autodesk Inventor 2015 Certified Professional & Autodesk Inventor 2012 Certified Professional.
Tags (1)
Message 3 of 3
Anonymous
in reply to: VdVeek

Yes, it is!

Thanks for the response.

 

 

 

Euhmmm one more question.

 

oRead.ReadLine()

 

Which line does it read? Can it also be used ie ReadLine number 3?

For now i have no need for it, but maybe one day i would expand my .txt file content and it could be usefull.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report