Author Topic: surface symbol  (Read 3154 times)

0 Members and 1 Guest are viewing this topic.

NirantarVidyarthee

  • Guest
surface symbol
« on: April 24, 2013, 05:38:03 PM »
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.

NirantarVidyarthee

  • Guest
Re: surface symbol
« Reply #1 on: April 25, 2013, 03:10:53 PM »
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.