Api Origin Indicator in Centermark

Api Origin Indicator in Centermark

Anonymous
Not applicable
819 Views
3 Replies
Message 1 of 4

Api Origin Indicator in Centermark

Anonymous
Not applicable
Hi all, i am an engineering student an I'm writing a vba code to create an Inventor dwg.
I'd like to know if is it possible to attach the origin indicator (needed to make an Ordinate Dimension) to a centermark of a drawing view. The centermak is a point representing the origin of the assembly I'm projecting on the dwg and its attached entity is simply a workpoint.
I'm able to create an intent for the centermark (sheet.creategeometryintent(centermark)), but when I try to create an origin indicator drawingview.createoriginindicaroe(intent), I receive an error. Sorry for my English, and thanks a lot for any kind of suggestion.
0 Likes
820 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I'm also interested in this!
0 Likes
Message 3 of 4

Anonymous
Not applicable

Nice!!!

I can't find a solution... hoping that someone helps us....

0 Likes
Message 4 of 4

Curtis_Waguespack
Consultant
Consultant

 

Ilogic  example, in case it helps someone in the future:

 

'define the document
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

'Define the drawing sheet
Dim oSheet As Sheet
oSheet =  oDoc.ActiveSheet

'[ place new symbols
For Each oView In oSheet.DrawingViews
	
	'get the model from the view
	Dim oModel as Document
	oModel = ActiveSheet.View(oView.Name).ModelDocument
	
	'get the origin workpoint
	oOriginPoint = oModel.ComponentDefinition.WorkPoints(1)
	
	'place center mark
	Dim oCenterMark As Object
	oCenterMark = oSheet.Centermarks.AddByWorkFeature(oOriginPoint,oView)

	Next 'next view
']

EESignature

0 Likes