Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Obstacles during the development of a macro (drawing)

Status
Not open for further replies.

ABasA

Materials
Apr 19, 2016
2
ES
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.
 
Replies continue below

Recommended for you

also stuck with roughness symbol. i just create roughness symbol with lines (script)
 
Hi,

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

- Romania
- EU
 
Hi!

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top