Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 6
Lesoux
606 Views, 5 Replies

General Note!

I have an interesting situation. When I try to add Child based on :IvGeneralNote design (see code below), Intent generates error message (see attached picture).

 

Child myChild As :IvGeneralNote

point1 = Point(0,0,0)

formattedText = "Bla-bla-bla"

End Child

 

However, If I add to Child parameter "sheet = Parent", everything is OK.

 

I don't understand this situation, because parameter "Sheet" is defined in the :IvGeneralNote design like "Parent" by default (see code below):

 

<%%Category("Inventor"), %%Prompt("Intent Part representing the drawing sheet on which to place the note.")> _
Parameter Rule sheet As Part = Parent

 

What is happening?

 

 

Win10 x64
Xeon E5-1630
32 Gb RAM
Quadro K5200

Inventor 2020.3.4, Build 373
5 REPLIES 5
Message 2 of 6
Chris.Palmatier
in reply to: Lesoux

Are you creating the general note as a child of a sheet? It looks like it's a child of a view, but it should be a child of the sheet if possible (hence the default value of Sheet = Parent).



Chris Palmatier
Customer Success Engineer
Inventor Engineer-to-Order

Message 3 of 6
Lesoux
in reply to: Chris.Palmatier

Thanks for fast reply.

Yes, I'm creating General Notes as a child on the view, because I'm using some entities (center marks) as basic objects for placement point of General Note.

Win10 x64
Xeon E5-1630
32 Gb RAM
Quadro K5200

Inventor 2020.3.4, Build 373
Message 4 of 6
colin.mccoy
in reply to: Lesoux

I believe the difference is the context of "Parent".

 

In the parameter declaration (Parameter Rule sheet As Part = Parent), the context is the part defining the parameter (so Parent of the note).

 

In the Child definition...

Child myChild As :IvGeneralNote

    Sheet = Parent

End Child

...the context is the part defining the child, which is the parent of the note (so Parent of the Parent of the note).

Message 5 of 6
Lesoux
in reply to: colin.mccoy

Thanks for reply. This is a little bit misleading. 

Win10 x64
Xeon E5-1630
32 Gb RAM
Quadro K5200

Inventor 2020.3.4, Build 373
Message 6 of 6
Chris.Palmatier
in reply to: Lesoux

While technically we allow you to place a general note as a child of other objects, in practice it's best to match Inventor's structure. In Inventor, a general note lives on the sheet, and doesn't reference views or view geometry. Positioning the general note in Intent uses sheet coordinates, so you could use the view's origin easily. If you need to reference view geometry to position the note, look at the methods in %%CommonViewMixin: 

'# ------------------------------
'# METHODS
'# ------------------------------

'
'# Return a (2d) Point in view space corresponding to the specified Workpoint.
'
  Method workpointLocation(workpointPart As Part, workpointName As String) As Point
    Dim modelPoint As Point = model.occurrenceWorkPoint(workpointPart, workpointName, :All)
    workpointLocation = iv_modelToView(self(), modelPoint)
  End Method

'# Return a (2d) Point in sheet space corresponding to the 
'# specified Point in view space.
  Method viewToSheet(viewPt As Point) As Point
    viewToSheet = iv_viewToSheet(self(), viewPt)
  End Method

'
' Converts the coordinates of the point in the Model units to these of the point in the Sheet units
'
  Method worldToView(p As Point) As Point
    Dim vp As Point = iv_modelToView(self(), p)
	Return Point( getX(vp)*viewScale, getY(vp)*viewScale, getZ(vp)*viewScale)
  End Method

 



Chris Palmatier
Customer Success Engineer
Inventor Engineer-to-Order

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

Post to forums  

Autodesk Design & Make Report