Hi
I have an external rule to fill my title block.
I use a different rule for each project.
I use a simple TXT files
I'm looking for a rule wich allows me to look for my rules anywhere on our server.
What should be the code?
Thanks
Solved! Go to Solution.
Hi
I have an external rule to fill my title block.
I use a different rule for each project.
I use a simple TXT files
I'm looking for a rule wich allows me to look for my rules anywhere on our server.
What should be the code?
Thanks
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Why don't you just use a single rule with end user input to fill the titleblocks?
Are the rules set up to a trigger?
If so, just set a flag based on each project for when the rule gets triggered so it knows what to run....
Seems to me like this would likely be much easier than managing a gazillion different text files...
Why don't you just use a single rule with end user input to fill the titleblocks?
Are the rules set up to a trigger?
If so, just set a flag based on each project for when the rule gets triggered so it knows what to run....
Seems to me like this would likely be much easier than managing a gazillion different text files...
Hi Sprocket107,
I think a lot more information is needed, can you post the rule that looks for the file, etc.
Maybe a better way would be an excel file with each project listed by project number along with the other info, then we'd just look up the info by project number, from a single file, that you would update with each new project? Just a thought.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Hi Sprocket107,
I think a lot more information is needed, can you post the rule that looks for the file, etc.
Maybe a better way would be an excel file with each project listed by project number along with the other info, then we'd just look up the info by project number, from a single file, that you would update with each new project? Just a thought.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Hi Curtis
Here is the kind of rule I want to use.
TITLE-BLOCK-INFO.txt
iProperties.Value("Summary", "Company") = "COMPANY"
iProperties.Value("Summary", "Subject") = "SUBJECT"
iProperties.Value("Summary", "Category") = "CATEGORY"
ETC...
I will fill those infos for each project.
I will copy and place this file into the client directory.
I want to use the same IDW template for all our project.
I will place a rule in the template wich allows the user to get the "TITLE-BLOCK-INFO.txt" in the client directory and it will fill the title block automaticaly, each time he create a new drawing.
I want the user to run the rule manualy, because I dont want to change my template for each project.
Maybe the rule can keep the last directory in mind so we don't have to click so much directory back and forth.
You know, I think this is a good idea for our kind of job but maybe there is a better way to do this.
Thanks again.
Hi Curtis
Here is the kind of rule I want to use.
TITLE-BLOCK-INFO.txt
iProperties.Value("Summary", "Company") = "COMPANY"
iProperties.Value("Summary", "Subject") = "SUBJECT"
iProperties.Value("Summary", "Category") = "CATEGORY"
ETC...
I will fill those infos for each project.
I will copy and place this file into the client directory.
I want to use the same IDW template for all our project.
I will place a rule in the template wich allows the user to get the "TITLE-BLOCK-INFO.txt" in the client directory and it will fill the title block automaticaly, each time he create a new drawing.
I want the user to run the rule manualy, because I dont want to change my template for each project.
Maybe the rule can keep the last directory in mind so we don't have to click so much directory back and forth.
You know, I think this is a good idea for our kind of job but maybe there is a better way to do this.
Thanks again.
Hi Sprocket107,
Something like this could work, see attached Inventor 2015 file.
This expects the text file to be in the same folder as the drawing file, so it knows where to look.
Example:
C:\TEMP\72145-\72145-001.idw
C:\TEMP\72145-\Title Block Info.txt
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
'get the text file 'expects to find text file in same folder as 'the current file oFile = ThisDoc.Path & "\" & "Title Block Info.txt" 'read the file oRead = System.IO.File.OpenText(oFile) EntireFile = oRead.ReadToEnd() oRead.Close() 'create aray from text info 'splitting at that comma oSplit = Split(EntireFile,",") iProperties.Value("Summary", "Company") = oSplit(0) iProperties.Value("Summary", "Subject") = oSplit(1) iProperties.Value("Summary", "Category") = oSplit(2) InventorVb.DocumentUpdate()
Hi Sprocket107,
Something like this could work, see attached Inventor 2015 file.
This expects the text file to be in the same folder as the drawing file, so it knows where to look.
Example:
C:\TEMP\72145-\72145-001.idw
C:\TEMP\72145-\Title Block Info.txt
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
'get the text file 'expects to find text file in same folder as 'the current file oFile = ThisDoc.Path & "\" & "Title Block Info.txt" 'read the file oRead = System.IO.File.OpenText(oFile) EntireFile = oRead.ReadToEnd() oRead.Close() 'create aray from text info 'splitting at that comma oSplit = Split(EntireFile,",") iProperties.Value("Summary", "Company") = oSplit(0) iProperties.Value("Summary", "Subject") = oSplit(1) iProperties.Value("Summary", "Category") = oSplit(2) InventorVb.DocumentUpdate()
Hi Curtis
This is absolutely good.
Thank you very much.
Hi Curtis
This is absolutely good.
Thank you very much.
Can't find what you're looking for? Ask the community or share your knowledge.