VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

surface symbol

1 REPLY 1
SOLVED
Reply
Message 1 of 2
NirantarVidyarthee
581 Views, 1 Reply

surface symbol

How can I create a surface texture symbol (ACM 2011) on a dimension (see attached drawing) using VBA without interactively selecting the dimemsion?

I have a point on the dimesnion and the entity name / handle of the dimension which I want to pass to the VBA function.

I am using the code from Introducing the AutoCAD® Mechanical API, Wayne Brill – Autodesk (http://aucache.autodesk.com/au2007/sessions/1133/file_3939.pdf)

While this code interactively selects the point and the line (dimension in my case), I don't want to use interaction. Instead I have lisp variable.

I have used the vlax.cls to convert the point to a variant and handle to an object. (I could use Users variables instead with more complex code). This works well but the code fails at the line:

oSurfSymbol.AttachGeometry dimHor, pt

This is because the method requires IMcadLine object I have IAcadLine2 object

Please help.

1 REPLY 1
Message 2 of 2

In case anybody sees this:

 

OK. I got it after trying for two days. AttachGeometry requires a 3D point - array p2(2) of doubles and I was using variant p2(2). It works now.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost