Jump to content

Is it possible to create associative, PaperSpace dimensions using VBA


ginak

Recommended Posts

:) Hello. As I am completely new to this forum, I apologize for doing things in "newbie" fashion. I have a VBA program that I created to automatically generate geometry in AutoCAD and save the drawings. I am at the point where I am adding dimensions. The customer (and I for that matter) prefer to put dimensions in PaperSpace now that they can be associated with ModelSpace objects. It would seem based on the method for creating diametric dimensions in vba that, (A) they will be placed in ModelSpace since the points used to specify the size of the object are in MS, and (B) they are not associative because the dimension is not associated with an object but rather points in space. I would prefer to create said dimensions by programmatically selecting the circle (or other object) and specifying the location for the dimension text so that they would be assoc w/ the selected object. But the AddDimDiametric method doesn't give those options (not in vb6.5 anyway.)

 

 

What I really want to know is if anyone has had any luck creating dimensions using vb such that the dim's are associative and, even better, associated to MS objects but located in PS. Yeah, I'm thinking it's like asking for the moon, but it never hurts to ask.

 

This is the statement for creating diametric dimensions. varFirstPt and varSecondPt would be the chord points (as if you were creating a 2-point circle) and I'm specifying them programmatically (not by the user selecting the points.) The placement of those 2 points will also define the angle of the leader line. dblLeaderLength (as you already guessed) defines the length of the leader.

 

Set objDimDiametric = ThisDrawing.ModelSpace.AddDimDiametric(varFirstPt, varSecondPt, dblLeaderLength)

 

I feel like I'll be breaking a cardinal rule of AutoCAD by creating dimensions that are non-associative.:unsure:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...