Using Transient Geometry (Create Point) for a centermark on 2d drawing.

Using Transient Geometry (Create Point) for a centermark on 2d drawing.

Tiffany_Hayden_
Collaborator Collaborator
620 Views
4 Replies
Message 1 of 5

Using Transient Geometry (Create Point) for a centermark on 2d drawing.

Tiffany_Hayden_
Collaborator
Collaborator

This may be a shot in the dark. But Here I go. 🙂 

 

My assembly structure looks like this: 

oOcc (Assembly)

  - MAKEUP PLANE 

  oOcc2 (sub component)

     - PLANE ELEVATION

     - PLANE IN OUT

 

What I would like to do is create a point in space at the intersection of MAKEUP PLANE, PLANE ELEVATION AND PLANE IN OUT. I have tried the below to get the point. 

 

Set oPoint = ThisApplication.TransientGeometry.CreatePoint(oWPlaneElevProxy.Plane.RootPoint.X, oWPlaneMakeup.Plane.RootPoint.Y, oWPlaneInOutProxy.Plane.RootPoint.Z)

 

oWPlaneElevProxy - Proxy created since it is the sub component of oOcc. 

oWPlaneInOutProxy - Proxy created since it is the sub component of oOcc. 

oWPlaneMakeup - no Proxy created since it is at the assembly level. 

 

Then I tried this: 

Set oPoint2d = oDrawView.ModelToSheetSpace(oPoint)

 

I thought I needed to add it as  workfeature using the below. But since it isn't a workfeature technically and it is transient am I missing something? 

Set oCenterMark = oSheet.Centermarks.AddByWorkFeature(oWPointProxy, oDrawView)

 

Example code I have tried: 

 

Set oWPlaneMakeUp = GetDocWPl(oOcc.Definition.Document, "MAKEUP PLANE")
Set oWPlaneInOut = GetDocWPl(oOccMakeUp.Definition.Document, "PLANE IN OUT")
Set oWPlaneInOutProxy = GetWPlProxy(oOccMakeUp, oWPlaneInOut)
Set oWPlaneElev = GetDocWPl(oOccMakeUp.Definition.Document, "PLANE ELEVATION")
Set oWPlaneElevProxy = GetWPlProxy(oOccMakeUp, oWPlaneElev)

Set oPoint = ThisApplication.TransientGeometry.CreatePoint(oWPlaneElevProxy.Plane.RootPoint.X, oWPlaneMakeUp .Plane.RootPoint.Y, oWPlaneInOutProxy.Plane.RootPoint.Z)
Set oPoint2d = oDrawView.ModelToSheetSpace(oPoint)
Set oWPointProxy = GetWPtProxy(oOcc, oPoint)
Call oDrawView.SetIncludeStatus(oWPointProxy, True)
Call oDrawView.SetVisibility(oWPointProxy, True)
Set oCenterMark = oSheet.Centermarks.AddByWorkFeature(oWPointProxy, oDrawView)
Call oCLCol.Add(oCenterMark)

 

 

Like I said I'm not sure if this is even possible since it's not a work feature. I have only created centermarks off of workfeatures. I would like to do it using transient geometry in this case because it's not needed per say by the user on the model side. 

 

Thanks in advance for any help. 

 

 

 

 

 

 

 

 

 

 

Tiffany Hayden
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Accepted solutions (1)
621 Views
4 Replies
Replies (4)
Message 2 of 5

gerrardhickson
Collaborator
Collaborator

Hi Tiffany,


Could you provide an example and perhaps a bit more detail of what you want the outcome to be - are you intending for the point to be visible, or are you planning on using the transient geometry object further in your code?

0 Likes
Message 3 of 5

Tiffany_Hayden_
Collaborator
Collaborator

@gerrardhickson 

The intended purpose of using the transient geometry is to project that geometry on a drawing and use the point to attach a ordinate dimension to. That is the plan. I'm fearful that I'm going to have to create a workpoint in my assembly and go from there. I was hopeful I could use transient geometry instead. 

Tiffany Hayden
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 4 of 5

gerrardhickson
Collaborator
Collaborator
Accepted solution

Hi Tiffany,

 

As I use understand it, transient geometry is a kind of 'behind the scenes' geometry that inventor used to build other types of geometry and so it's no available for us to use in that way.

 

I have a similar project I'm working on at the moment and I intend to use work points that are projected into the drawing like you say. The benefit of this method if done right is that it's parametric, so future updates will be reflected automatically.

 

This method can still be automated with code is that's important, but you need to define the work point using existing geometry.

 

I hope that helps.

0 Likes
Message 5 of 5

Tiffany_Hayden_
Collaborator
Collaborator

Yes I've always used workpoints/workplanes to do this process. I was just curious if you "could" do it with transient geometry instead. Saves the headache of adding workpoints to already existing documents. But I knew it was a shot in the dark! Thanks for your help! @gerrardhickson 

Tiffany Hayden
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes