Hello everybody,
I want to engrave a text defined by a parameter in Excel (which will later be changed by Matlab). How can I do that? Preferably without iLogic or VB. More or less the same question was asked in 2009 by dpinson01 - however I didn't get an answer up to now. I hope I am luckier.
Thank You for help and idea in advance
Chris
Solved! Go to Solution.
Solved by imajar. Go to Solution.
I do not believe you can do it without ilogic/VBA. See this post:
Unless you want to imprint numbers only? then you could do it pretty easy.
Hello Ajarrett,
Thank You for the fast reply and the helpful info. That explains a lot - that text is simply not importable the easy way from Excel to Inventor. However I found a compromise by now: I will simply use a code consisting of one large number and also save it in Excel as a Matlab with "oE" (without unit). This number will then be used as the text for the engraving. It works out - however it is not ideal, because one has to know which digit in the long number means what. Would be far nicer with symbols such as dashes and letters.
All best and thanks again
Chris
I voted for the suggestion on Inventor-Idea by paul.mcnam:
...hopefully that will help.
The compromise is also not suitable yet, because The "...E+11" from the scientific notation always appears:
Hi! Another option is to Import the parameters (text included) from XML. You will need to save the Excel file as XML instead. Then the text parameter will be imported.
Many thanks!
Sounds interesting. Thank You very much for the reply. I wasn't familiar with xml-files and had to research a bit. To me it sounds quite time-consuming to define the xml schema (or how is it called?). May I ask You another thing before I spend more time on learning about xml-definition: Since I am using Matlab to create the table of geometric parameters including the text for the engraving, I guess I don't need Excel anymore. I might just want to use it for control of the XML-file will programming maybe (that's basically the same up to now). The important question: When I overwrite the xml-file from Matlab with a new version of the Inventor part (different geometry, different engraving) in the folder of the inventor part - can I update the part just by clicking on update? That's what I did with the Excel-files up to now. I don't want to import the file manually each time I overwrite the xml and thereby create a new version of the part.
There seems to be another way to connect/import the XML-file compared to the Excel-file, because I can't find it in the optional data-types using the same tool. (sorry for the German)
Hi! The quickest thing to find the xml file is to simply export an existing parameter table as an xml file. Then you will see how the xml file is structured. You can use iLogic to automate the process.
Your English is perfect. Please do not apologize. It is my fault that I don't speak German or other languages
Many thanks!
Hello again,
Thank You for the kind reply. Exporting the parameters once as XML to see how the XML file is structured is indeed helpfull for the XML-approach. However it I am still afraid that it would still not be a comfortable solution for my problem: Even if I had the Matlab-Code for the generation/new parameterization of the XML-table - I guess I would have to import the xml in Inventor everytime by hand again, once the engraving changed. That would be no problem for a single part, but with an assembly of several parts it does not seem convenient.
I chose a compromise of shortening the code to a 6 digits numerical number (because Inventor seems to round the number when importing from Excel). This code is fed in by an equation to a "User parameter" so that I can import it to the text-box:
It might be a suboptimal lazy way, but now a simple refresh also changes the number engraved 🙂
Hi! There are a few options to format the value. If you want to round off a parameter, simply use "round()" function. Another way is more elaborated, you can check "Export" box for the particular parameter in Parameter dialog. Then click on a small arrow button in the expression field -> Custom Parameter Format. Then the parameter will become a custom iProperty with the desirable format. It can be referenced in Text.
Many thanks!
Hi there,
thank You for the informations. The problem is more that I don't want to round and not that I want to round. But the solution I found with Your help is good enough and I learned something about XML. So I will keep it the way it is.
All the best
Chris
Can't find what you're looking for? Ask the community or share your knowledge.