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!

How to activate Thead Option in View Properties with a macro???

Status
Not open for further replies.

pbodog

Automotive
Jan 16, 2013
6
Hy all,

I'm Paul and I just join in your community. I hope that we can help each others.
And now to explain what I need and didn't manage to find by my own.
I have a macro that makes views from all elements that I have in a Product, but my environment settings for the view creation I cannot change because of the Project specifications.
So, all the views he makes without Hidden Lines and without Thread and I want that this options in the view to activate because later this piece it has to be dimensioned.
For Hidden Lines and for all other option I found how to modify them but what I need is : How to activate Thread Option??

Set drwViews = drwSheet.Views

Set drwView = drwViews.Add("FrontView")

Set drwViewGenerativeLinks = drwView.GenerativeLinks

Set drwViewGenerativeBehavior = drwView.GenerativeBehavior

Set oDoc3 = CATIA.Documents

drwViewGenerativeLinks.AddLink PartBDs.item(iPB)

drwView.GenerativeBehavior.HiddenLineMode = catHLRModeOn

drwViewGenerativeBehavior.DefineFrontView myAxisCoordinate(3),myAxisCoordinate(4),myAxisCoordinate(5),myAxisCoordinate(6),myAxisCoordinate(7),myAxisCoordinate(8)

drwView.x = 200

drwView.y = 200

drwView.Scale = 1

Set drwViewGenerativeBehavior = drwView.GenerativeBehavior

drwViewGenerativeBehavior.ForceUpdate

drwView.Activate
 
Replies continue below

Recommended for you

Morning everybody ,

So Nobody know the command to activate the Thread Option in View Properties (like in attachment). Then maybe somebody can tell me how I can draw the thread after the view it is created , because I tried what I have found but it doesn't do anything.
Thanks in advance,
Paul
 
 http://files.engineering.com/getfile.aspx?folder=19b77974-ac47-4b69-9cc1-5eef957538bc&file=001.jpg
Hi,

Drafting workbench is not so friendly....

Search in help file for DrawingThreads (Collection) and CatThreadLinkedTo (Enumeration) or even better (because you can see more) - DraftingInterfaces .

If you decide to draw circle (fake thread) then you can have to look at Factory2D (Object) - from help file:

Func CreateCircle( double iCenterX,
double iCenterY,
double iRadius,
double iStartParam,
double iEndParam) As Circle2D

Creates and returns a 2D circle arc.
Parameters:
iCenterX
The X coordinate of the circle center
iCenterY
The Y coordinate of the circle center
iRadius
The radius of the circle
iStartParam
The beginning parameter of the circle.
This parameter is an angle value between 0 included and 2PI excluded. Parameter values are computed from the axis horizontal direction in the trigonometrical direction.
iEndParam
The end parameter of the circle.
This parameter may take any value between iStartParam excluded and 4PI included.
o Func CreateClosedCircle( double iCenterX,
double iCenterY,
double iRadius) As Circle2D


Regards
Fernando

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor