Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create DrawingView -- Reference Data

5 REPLIES 5
Reply
Message 1 of 6
abhisinghal21
440 Views, 5 Replies

Create DrawingView -- Reference Data

Hi

I am trying to create a new base view in drawingdocument.

I can get hold of the view but cant find a way to set reference data --- would like to set the "Line Style" to "As Parts" and "Hidden Line Calculation" to "All Bodies".

Is there a way / workaround ?

Thanks

Abhishek
5 REPLIES 5
Message 2 of 6
FarrenYoung
in reply to: abhisinghal21

Is this yet possible?

--Farren

************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************
Message 3 of 6
Robert..F
in reply to: FarrenYoung

Has this feature been added, yet?

Message 4 of 6

If you have a reference to the DrawingView object then you may solve this problem in four steps.

 Workaround: 

1) Property DrawingView.ReferencedDocumentDescriptor returns the model document referenced by this view.  In your case this should be an assembly document.

2) You may scan assembly hierarchy to find referenced components.

3) Magic property DrawingView.DrawingCurves(referenced ComponentOccurrence) returns DrawingCurvesEnumerator with all drawing curves within the drawing view from this particular component occurrence.

4) If Count >0 then you may change properties of the DrawingCurve objects found to satisfy your requirements (line type, line weight, etc.).  Or change Layer property of all DrawingCurveSegment objects in the collection DrawingCurve.Segments() . 

Should this work for you?


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 5 of 6

Changing the layer properties will indeed make these lines appear solid rather than the phantom lines, but I believe that hidden line calculation will still need to be set in order for these items to appear properly.  I will try this when I have a free moment and see if this is the case.

Message 6 of 6
xiaodong_liang
in reply to: Robert..F

Hi,

 

Good point.

 

DrawingCurveSegment.HiddenLine can returns whether this segment represents the hidden portion of a line

DrawingCurveSegment.Layer can set the layer associated with this segment.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report