- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
My function creates the centerline or centermark as expected. SetIncludeStatus does not return an object and I need to resize and dimension to the centerline or centermark.
Function CreateCLine(Sht As Sheet, dv As DrawingView, occ As Object, AxisName As String) As Centerline Dim docDesc As DocumentDescriptor = dv.ReferencedDocumentDescriptor Dim Doctype As DocumentTypeEnum = docDesc.ReferencedDocumentType 'get objects If Doctype = DocumentTypeEnum.kPartDocumentObject includeObj = occ.Definition.WorkAxes(AxisName) Else ''assembly, so GET PROXY OF OCCURRENCE includeObj = ASI_.getWorkAxisProxy(occ, AxisName) End If 'includes objects dv.SetIncludeStatus(includeObj, True) ''find centerline that was just created Dim newCL As Centerline For Each CL As Centerline In Sht.Centerlines If CL.ModelWorkFeature Is includeObj newCL = CL Exit For End If Next Return newCL End Function
The end of my function tries to find what was just created by looking at the ModelWorkFeature. But I have 2 problems...
- I don't know if it created a centerline or centermark.
- I will have projected views that create a centerline or centermark using the same Axis.
Any ideas, about how to find what I just created?
Josh Hunt
Solved! Go to Solution.

