Obstacles during the development of a macro (drawing)
Obstacles during the development of a macro (drawing)
(OP)
This is my first post, so first of all, hi everyone!!
I'm developing a macro that get info from parameters and user inputs (using dialogs or userforms) and puts it in tables, texts and title block in a drawing.
Some of the tasks that I'm unable to accomplish are :
- Draw a roughness symbol
- Get the height of a text present in the drawing (I'd need this for positioning the text over a table of variable size). The text is variable too, if not it'd be easy to measure its height.
- Manage the event of adding a new sheet or inserting a view to automatically run a rule, reaction or macro
- Reorder a parameter (change its position in the tree)
I don´t even know whether is it possible to be donde.
Help would be very appreciated. Sorry for my English and thanks in advance.
I'm developing a macro that get info from parameters and user inputs (using dialogs or userforms) and puts it in tables, texts and title block in a drawing.
Some of the tasks that I'm unable to accomplish are :
- Draw a roughness symbol
- Get the height of a text present in the drawing (I'd need this for positioning the text over a table of variable size). The text is variable too, if not it'd be easy to measure its height.
- Manage the event of adding a new sheet or inserting a view to automatically run a rule, reaction or macro
- Reorder a parameter (change its position in the tree)
I don´t even know whether is it possible to be donde.
Help would be very appreciated. Sorry for my English and thanks in advance.





RE: Obstacles during the development of a macro (drawing)
RE: Obstacles during the development of a macro (drawing)
1.There is no API to create roughness symbol.
2.
For DrawViewCount = 3 To DrawSheet.Views.Count
Set DrawView = DrawSheet.Views.Item(DrawViewCount)
For DrawTextCount = 1 To DrawView.Texts.Count
Set DrawText = DrawView.Texts.Item(DrawTextCount)
For TextCount = 1 To Len(DrawText.Text)
If DrawText.GetParameterOnSubString(catFontSize, TextCount, 1) = "5" Then
DrawText.SetParameterOnSubString catColor, TextCount, 1, 65280
End If
Next ''TextCount
Next ''DrawTextCount
Next'' DrawViewCount
3. Never tried...
4. I don't think is possible, still you can try cut/paste (I didn't try).
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Obstacles during the development of a macro (drawing)
Thanks ferdo.
In relation with the roughness symbol, I tried calling the Catia command and after not getting a good behavieur and looking for info, I read that CATIA.StartCommand is not valid for interactive commands. I will try with hide/show preexisting sysmbols because I'll only need two types.
Regards.