Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Visual studio and visual basic get properties

26 REPLIES 26
SOLVED
Reply
Message 1 of 27
matrax1405
789 Views, 26 Replies

Visual studio and visual basic get properties

Hi good morning, I need help.  Robot Indifferent
In school I left an exercise in visual Basic and AutoCAD and need help,
The problem is that I need to do to get the properties to click a wall for example, what is the height, broad and then do things like operations.
The bad is that it's my first time doing this kind of development with AutoCAD, I would greatly appreciate if you help me step by step Robot surprised

26 REPLIES 26
Message 2 of 27
REID7800
in reply to: matrax1405

Try Autolisp!

(defun c:dump ( / *error* obj ) (vl-load-com)
  (defun *error* ( m )
    (or (wcmatch (strcase m) "*BREAK,*CANCEL*,*EXIT*")
         (princ (strcat "\n** Error: " m " **"))
    )
    (princ)
  )
  
  (if (setq obj (car (entsel "\nSelect object to show applicable properties/methods: ")))
    (progn
      (vlax-dump-object (vlax-ename->vla-object obj) t)
      (vlax-release-object (vlax-ename->vla-object obj))
      (textscr)
    )
  ) (princ)
)

Properties Example:

(vla-get-Coordinates object)
(vlax-get object 'Coordinates)



Method Example:

(vla-Highlight object :vlax-true)

(vlax-invoke object 'Highlight :vlax-true)

 

_____

Reid B.
_____
Acad 2015
Architecture 2010
Message 3 of 27
REID7800
in reply to: matrax1405

tell me what you're wanting to accomplish and I'll try to help
_____

Reid B.
_____
Acad 2015
Architecture 2010
Message 4 of 27
matrax1405
in reply to: REID7800

Hi thanks for the reply gave me an idea, but I want to do a Windows Form in visual studio then connect AutoCAD using VISUAL BASIC and when clicking to give the line attributes display in a tectbox or label.you could help me please

Message 5 of 27
REID7800
in reply to: matrax1405

As far as Visual Basic goes, I have no experience with it. I can program in C#.. You CAN obtain and modify certain properties from C#. Would this be of interest to you?

_____

Reid B.
_____
Acad 2015
Architecture 2010
Message 6 of 27
dbroad
in reply to: matrax1405

You probably should visit the .NET group  here: http://forums.autodesk.com/t5/NET/bd-p/152

 

Architect, Registered NC, VA, SC, & GA.
Message 7 of 27
matrax1405
in reply to: REID7800

if I would like to help me

Message 8 of 27
matrax1405
in reply to: dbroad

ok thanks also ask

Message 9 of 27
REID7800
in reply to: matrax1405

Something really quick... What are you trying to accomplish??

_____

Reid B.
_____
Acad 2015
Architecture 2010
Message 10 of 27
matrax1405
in reply to: REID7800

Explained I would start the Windows forms, connect to AutoCad and let me select a line for example if the line have a height of 9 ft and a width of 3ft and wall type, put those values into a textbox or a label and display it in Windows forms

Message 11 of 27
REID7800
in reply to: matrax1405

You say wall... is this Autocad...? 

What kind of object? Mline, Polyline, Line..?

_____

Reid B.
_____
Acad 2015
Architecture 2010
Message 12 of 27
matrax1405
in reply to: REID7800

similar a video video but upside down , i have the line and demos when you click in the line and get the properties and save in varies and show in a  textbox Robot Happy 

you are helping me a lot I really appreciate it

Message 13 of 27
matrax1405
in reply to: matrax1405

similar a video video but upside down , i have the line and demos when you click in the line and get the properties and save in varies and show in a  textbox Robot Happy

you are helping me a lot I really appreciate it

Message 14 of 27
matrax1405
in reply to: matrax1405

Objects such as polyline, line Robot Indifferent

Message 15 of 27
REID7800
in reply to: matrax1405

something like this? do you have visual studios? What version of Cad do you have?

_____

Reid B.
_____
Acad 2015
Architecture 2010
Message 16 of 27
matrax1405
in reply to: REID7800

You are a genius that's exactly what I need and I have visual autoCAD 2012 and 2014 Robot surprised 

Message 17 of 27
REID7800
in reply to: matrax1405

Sorry, I'm away from my desk.I'll post this in an hour
_____

Reid B.
_____
Acad 2015
Architecture 2010
Message 18 of 27
matrax1405
in reply to: REID7800

ok, no problem hopefully answer, thank you very much indeed.
I hope you can send me the solution

Spoiler
Spoiler
Robot Happy

 

 

Message 19 of 27
REID7800
in reply to: matrax1405

I PM'd you the visual studio project. I only have 2012 at home but have 2014 and 2015 at work. I'll send you 2014 in the morning
_____

Reid B.
_____
Acad 2015
Architecture 2010
Message 20 of 27
REID7800
in reply to: matrax1405

Guess you can't send files through pm... here you go

_____

Reid B.
_____
Acad 2015
Architecture 2010

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

Post to forums  

Autodesk Design & Make Report

”Boost