Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

drawing dimensions

Status
Not open for further replies.

3dsd

New member
Joined
Oct 1, 2014
Messages
2
Location
GB
thread560-359463

i have been working out a macro,where i m able to generate the views from model but i m not able to dimension the generated view.
if anyone could help me out with this
 
[ponder] sorry i was not clear in the question.
i meant in catvba.
using code:
Dim documents1 As Documents
Set documents1 = CATIA.Documents
Dim drawingDocument1 As DrawingDocument
Set drawingDocument1 = documents1.Open("C:\Users\XYZ\Desktop\xxx.catDrawing")
Dim drawingSheets1 As DrawingSheets
Set drawingSheets1 = drawingDocument1.Sheets
Dim drawingSheet1 As DrawingSheet
Set drawingSheet1 = drawingSheets1.Item("Sheet.1")
Dim drawingViews1 As DrawingViews
Set drawingViews1 = drawingSheet1.Views
Dim drawingView1 As DrawingView
Set drawingView1 = drawingViews1.Add("Front View")
Dim drawingViewGenerativeLinks1 As DrawingViewGenerativeLinks
Set drawingViewGenerativeLinks1 = drawingView1.GenerativeLinks
Dim drawingViewGenerativeBehavior1 As DrawingViewGenerativeBehavior
Set drawingViewGenerativeBehavior1 = drawingView1.GenerativeBehavior
Dim partDocument1 As PartDocument

Set partDocument1 = documents1.Item("XXXXX")
Dim product1 As Product
Set product1 = partDocument1.GetItem("12333")
drawingViewGenerativeBehavior1.Document = product1
drawingViewGenerativeBehavior1.DefineFrontView 1#, 0#, 0#, 0#, 1#, 0#
drawingView1.X = 279.4
drawingView1.Y = 215.9
Set drawingViewGenerativeBehavior1 = drawingView1.GenerativeBehavior
drawingViewGenerativeBehavior1.Update
drawingView1.SetViewName "Front View", "", ""
drawingView1.Activate
drawingView1.[Scale] = 0.5

this code generates view
i m not able to give dimensions for the generated view through code
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top