surface symbol

surface symbol

NirantarVidyarthee
Advocate Advocate
680 Views
1 Reply
Message 1 of 2

surface symbol

NirantarVidyarthee
Advocate
Advocate

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.

0 Likes
Accepted solutions (1)
681 Views
1 Reply
Reply (1)
Message 2 of 2

NirantarVidyarthee
Advocate
Advocate
Accepted solution

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.