Dimensions on the placed views.....?

 

Hi Jason...hw r u?

i have a problem....i am placing views of part model thru modellink object on the draft sheet. Now i want to place the dimensions on a particular view thru coding [ not retrieve dim ]...here i m getting stuck. Can u help me out of this problem if possible? i am using vb.net and SE 18 n 19.........

Thanks in advance.......

Prasad Pawar

 

Posted by: Prasad Pawar
Post date: 9/13/2007 5:47:28 PM

13 REPLIES

RE: Dimensions on the placed views.....?

Hi jason.......

Sorry but i am still waiting for your reply.......

 

Prasad Pawar

 

Posted by: Prasad Pawar
Post date: 9/17/2007 11:15:43 PM

RE: Dimensions on the placed views.....?

 

Prasad,

 

Sorry for not getting back with you. I didn't have an easy answer and I've been really busy at work lately.

 

Look at the SolidEdgeFrameworkSupport.Dimensions interface, I see a ton of Add...() functions. You need to look at these and figure out which one you want. If you can't figure out how to use the one that you pick, let me know and I'll try to come up with an example.

 

i.e. (assuming Draft is open)

Application->ActiveDocument->ActiveSheet->Dimensions

 

Posted by: Jason Newell
Post date: 9/18/2007 1:08:51 PM

RE: Dimensions on the placed views.....?

Hi Jason...

The Add function in SolidEdgeFrameworkSupport.Dimensions interface only adds the dimension to entities which we have drawn. E.g. arc2d, circle2detc. But if there is already views placed then it doesn't work. Please help me to get out of it successfully.

 

Thanks in advance

Prasad Pawar

 

Posted by: Prasad Pawar
Post date: 9/20/2007 7:10:08 AM

RE: Dimensions on the placed views.....?

 

Hi,

I was able to place dimensions on views that I created with the API by using the collections under drawing view.

Example:

dim SEDft As SolidEdgeDraft.DraftDocument

SEDft = SEApp.Documents.Add("Solidedge.DraftDocument")

dim SEDftDVs As SolidEdgeDraft.DrawingViews

 

SEDftDVs = SEDft.ActiveSheet.DrawingViews

Dim DV1 As SolidEdgeDraft.DrawingView

 

DV1 = SEDftDVs.AddAssemblyView(, SolidEdgeDraft.ViewOrientationConstants.igTopView, 1, 0.25, 0.25, SolidEdgeDraft.AssemblyDrawingViewTypeConstants.seAssemblyConfigurationSimplifiedView, "default")

 

dim line as SolidEdgeDraft.DVLine2d

 Dim SEdim As SolidEdgeFrameworkSupport.Dimension

Dim sedims As SolidEdgeFrameworkSupport.Dimensions = SEDft.ActiveSheet.Dimensions

 For m As Integer = 1 To DV1.DVLines2d.Count

        line = DV1.DVLines2d.Item(m)

        SEdim = sedims.AddLength(line1)

next

 

So this example would place a length dimention on each 2Dline in your placed drawing view.  I don't know why the dimensions are off to the side, but its a start.

 

~Matt

 

 

 

Posted by: Matthew Daniel
Post date: 10/4/2007 10:24:39 AM

RE: Dimensions on the placed views.....?

 

I found out why the dimensions were off to the side.

Instead of using the DVline object directly, you must use the DVline.referance.  This converts the dimensions from the sheet coodinate system to the drawing view coordinate system.

 

~Matt

 

 

 

Posted by: Matthew Daniel
Post date: 10/5/2007 9:21:51 AM

RE: Dimensions on the placed views.....?

 

Hi Matt,

Great thing. Thank you so much. It is working fine.

I want to ask you one more thing, if you dont mind. I am creating a assembly for mechanical seal. there are around 15 to 20 parts and a subasm. i want to assemble it programatically

Is it possible to give all the relations to the asm thru programming?

Please do help me in this matter.

Thanks you so much

 

Posted by: Prasad Pawar
Post date: 10/5/2007 7:38:08 PM

RE: Dimensions on the placed views.....?

 

Yes its not too difficult generally.  This is documented in the v15 programming guide with is found at the ugs support site.

http://support.ugs.com/docs/se/v15/ProgGuide.pdf

You need to webkey to get in.  Let me know if you have any problems,

~Matt

 

Posted by: Matthew Daniel
Post date: 10/9/2007 9:26:12 AM

RE: Dimensions on the placed views.....?

Matt,

i dont have the webkey. Can you please send me the pdf file on mail mentioned above?

 

Thanks in advance

Prasad

 

Posted by: Prasad Pawar
Post date: 10/10/2007 5:34:41 PM

RE: Dimensions on the placed views.....?

Prasad,

 

I'm not sure about the legality of posting that document on my website so I'll ask the he do not upload it as of right now. Let me check into whether we can do that or not with Solid Edge first.

 

Posted by: Jason Newell
Post date: 10/10/2007 6:19:17 PM