Jump to content

How to draw a linear dimension in Acad with VBA?


firavolla

Recommended Posts

A linear dimension is referred to as DimRotated in the VBA api. This is the example used in the Developer Documentation. Is that any help?

DimR.jpg

Link to comment
Share on other sites

Yeah! Tried to look inside the help file, but i somehow missed the developer documentation :D.

 

P.S.: In this example and others, I've seen stuff like point1(0)=0#: what does # do and what does : do?

Link to comment
Share on other sites

The # symbolizes a “Double” data type. It is inserted automatically by the VBAIDE. If point1(0)=0.0 is typed in, it will automatically convert to point1(0)=0#

 

The : allows more than one statement per line of code. so

 

point1(0)=0#: point1(1)=0#: point1(2)=1#

 

is valid.

Link to comment
Share on other sites

  • 3 weeks later...

There are a few times I cheated with AutoCAD because using the COM connection had problems. One decent cheat you can experiment with is the AutoCAD .sendcommand method/ statement. A few times, I actually prefered it, because it was straight forward, and it works in many cases where the traditonal route had to much development time. You can suppress dialogs and other stuff, that can hold up execution. The Sendkeys VB Command is also useful at times

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...