Get Drawing dimensions of specific views via api

Get Drawing dimensions of specific views via api

Anonymous
Not applicable
1,818 Views
5 Replies
Message 1 of 6

Get Drawing dimensions of specific views via api

Anonymous
Not applicable

Hi everyone,

 

I'm trying to get all dimensions inside a specific view.

 

I already have all general dimensions in the complete drawing, but I only want to change the dimensions of a specific view.

 

I don't know, where to check, if its a dimension of view A or view B.

 

Should be easy I think, but I haven't found yet.

 

Greetings

0 Likes
Accepted solutions (1)
1,819 Views
5 Replies
Replies (5)
Message 2 of 6

basnederveen
Advocate
Advocate
Accepted solution

You can check 

 

Dim oview as DrawingView

Set oview = LinearGeneralDimension.IntentOne.Geometry.Parent 

0 Likes
Message 3 of 6

Anonymous
Not applicable

Yep, that works, thanks a lot.

0 Likes
Message 4 of 6

sellvakumarmech
Contributor
Contributor

Holo..

The above code is working fine. it was great..:) but not able to get the dimensions form (retrieve model dimensions) model. 

Is there any way to get dimension based on view in a sheet..?. (i want to add sketch symbol for views basic, so i like to select the dimensions based on the views.)  

Note: Kindly guide me the right way. if anything wrong with my approach..

 

Thanks in advance.  

Selvakumar

0 Likes
Message 5 of 6

basnederveen
Advocate
Advocate

I am sorry i do not really understand what you mean. Do you want to use retrieve model dimensions and create sketchpoints or do you want to add actual dimensions to the model?

 

 

0 Likes
Message 6 of 6

sellvakumarmech
Contributor
Contributor

Hey,

sorry for the late response..

I just trying to get the all dimensions text coordinated in .idw file based on the views. 

user Need to select a view and the loop returns an array of dimension text coordinates

 

as code follows,

for each oview in doc.activesheet.views

      for each odimension in doc.activesheet.oview.dimensions.

          arrayofdimcoordinated(i) = odimension .text.origin.x

          arrayofdimcoordinated(i) = odimension .text.origin.y

      next

Next

could you plesae help me ot find the dimensions for selected view.

 

thanks in advance.

Selvakumar V

 

 

0 Likes