How to activate Thead Option in View Properties with a macro???
How to activate Thead Option in View Properties with a macro???
(OP)
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
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





RE: How to activate Thead Option in View Properties with a macro???
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
RE: How to activate Thead Option in View Properties with a macro???
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
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...