« Colors missing on model after Stress Analysis | Main
11/01/2012
Control Sketched Symbol and Title Block via drawing parameters using Ilogic
In your drawing, you want to control the geometry of your title block or sketch symbols. Unfortunately drawing parameters are not directly linked with Symbol or Title blocks dimensions.
We created a short Ilogic code to help you realize this.
You will have to create User Parameters like this :
“SymbolorTitleBlockname”_”Dimensionname”
For example : I am editing the Symbol named Rectangle and I want to control its parameter d3. I will a user parameter named “Rectangle_d3”
The same applies for Title Blocks. The rule is case sensitive.
The Ilogic rule inside the drawing will scan all your parameters. If it detects a parameter with an underscore :
- it will look for a Title Block or a Sketched Symbol with the same name
- it will change the dimension in the parameter name if it exists.
- it will do a check to ensure the Block or Symbol is still editable after change.
The file ParameterDrawing contains the Ilogic rule and some sketched symbols with the corresponding parameters so you can get familier with this Rule. You can download it at the end of the article.
Pay attention to the units, we are not checking the parameter units are corresponding to the sketch units. Concerning Event trigger, there is no Event option for Parameter change. One solution is to use the “Before Save Document” trigger.
Thanks to Brian Ekins and Mike Deck for the great tips.
Pierre Masson.
Posted at 03:49 AM in API, Drawing, iLogic/VBA | Permalink
| |
Comments
You can follow this conversation by subscribing to the comment feed for this post.
Could you perhaps just post the code (as a .txt), or a file created with an earlier version of Inventor?
I'm still on 2012.
Thanks a lot!
Posted by: MegaJerk | 11/01/2012 at 09:36 AM
Hi,
Yes you're right. I attached the code as text at the end of the article.
Posted by: Pierre Masson | 11/02/2012 at 01:00 AM
Verify your Comment
Previewing your Comment
Posted by: |
This is only a preview. Your comment has not yet been posted.
Your comment could not be posted. Error type:Your comment has been posted. Post another commentThe letters and numbers you entered did not match the image. Please try again.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Nice iLogic usage story.

No comments:
Post a Comment