×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# hey.. i have a question regarding t

## hey.. i have a question regarding t

(OP)
hey.. i have a question regarding the code below..
i can draw the line in ACAD_ISO02W100...??
can someone correct for me??

Dim PLine2Obj As Object
Dim Points2(0 To 14) As Double

EWNS = -315
Points2(0) = -513.8151: Points2(1) = 10 + EWNS: Points2(2) = 0
Points2(3) = -493.8151: Points2(4) = 10 + EWNS: Points2(5) = 0
Points2(6) = -493.8151: Points2(7) = 100 + EWNS: Points2(8) = 0
Points2(9) = -513.8151: Points2(10) = 100 + EWNS: Points2(11) = 0
Points2(12) = -513.8151: Points2(13) = 10 + EWNS: Points2(14) = 0

### RE: hey.. i have a question regarding t

First, you should not have an object named modelspace. This object is already reserved by the AutoCAD API.

You should also declare the plineObj as a polyline:

Dim Points2(0 To 14) As Double

EWNS = -315
Points2(0)=-513.8151:Points2(1)=10+EWNS:Points2(2)=0
Points2(3)=-493.8151:Points2(4)=10+EWNS:Points2(5)=0
Points2(6)=-493.8151:Points2(7)=100+EWNS:Points2(8)=0
Points2(9)=-513.8151:Points2(10)=100+EWNS:Points2(11)=0
Points2(12)=-513.8151:Points2(13)=10+EWNS:Points2(14)=0

ÿ
Hope this helps!

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

### RE: hey.. i have a question regarding t

(OP)
But this is only work in AutoCAD API...
i tried to use the same code in visual basic.. but it doesn't work.... it can't load the linetype...:(

besides,, what about the ZoomALL command?? coz i doesn't define in visual basic..

### RE: hey.. i have a question regarding t

First, make sure that you add the AutoCAD Object Library to your project references. Second, the Linetypes object is not a part of the ModelSpace, it is derived from the AcadDocument object.

I started a new VB application that contained a single form. I put a command button on that form and put this code behind it.

Option Explicit

Private Sub Command1_Click()
Dim EWNS As Integer

Dim Points2(0 To 14) As Double

EWNS = -315
Points2(0)=-513.8151:Points2(1)=10+EWNS:Points2(2)=0
Points2(3)=-493.8151:Points2(4)=10+EWNS:Points2(5)=0
Points2(6)=-493.8151:Points2(7)=100+EWNS:Points2(8)=0
Points2(9)=-513.8151:Points2(10)=100+EWNS:Points2(11)=0
Points2(12)=-513.8151:Points2(13)=10+EWNS:Points2(14)=0

End
End Sub

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

### RE: hey.. i have a question regarding t

(OP)
it doesn't work too...:(

besides, how to i add the AutoCAD Object Library to my project references??

sorry to ask so many questions to you...:(

### RE: hey.. i have a question regarding t

Are you using VB? If so, go to Project>References. Find the AutoCAD Object library in the list and check the box. This links your program to the AutoCAD API.

If you are using VBA, in, let's say Excel, go to Tools > References and do the same thing.

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

### RE: hey.. i have a question regarding t

(OP)
i got it..
thanz you so much..:)!!

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

#### Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!