Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lisp AutoCAD __to__ Inventor

0 REPLIES 0
Reply
Message 1 of 1
hosneyalaa
133 Views, 0 Replies

lisp AutoCAD __to__ Inventor

hosneyalaa
Advisor
Advisor

 

 

(defun C:test_Inventor (/
                           *ACTIVEIDC*
                           *INVENTAPP*
                           *INVENTDCS*

                          )
  (vl-load-com)



  (if (setq
        *InventApp*
         (vlax-get-or-create-object "Inventor.Application")
      ) ;_ end of setq
    (progn


      (if (= :vlax-false (vlax-get-property *InventApp* 'Visible))
        (vlax-put-property *InventApp* 'Visible :vlax-true)

      ) ;_ end of if
      (vlax-put-property *InventApp* 'SilentOperation :vlax-true)
      (setq
        *InventDcs*
         (vlax-get-property *InventApp* 'Documents)
      ) ;_ end of setq
      (setq *ActiveIDc*
             (vlax-invoke-method
               *InventDcs* 'Add 12290 "" :vlax-true) ;_ end of vlax-invoke-method
 ;_ end of vlax-invoke-method

      ) ;_ end of setq



      (alert  (strcat "\nInventor.Application: name Document " (vlax-get-property *ActiveIDc* 'displayName))
        
      ) ;_ end of alert


    ) ;_ end of progn
  ) ;_ end of if


 ;_ end of if










  (princ)
) ;_ end of defun
;|«Visual LISP© Format Options»
(72 2 50 2 T "end of " 60 9 1 0 0 nil T nil T)
;*** DO NOT add text below the comment! ***|;

 

 

 

1.gif

0 Likes

lisp AutoCAD __to__ Inventor

 

 

(defun C:test_Inventor (/
                           *ACTIVEIDC*
                           *INVENTAPP*
                           *INVENTDCS*

                          )
  (vl-load-com)



  (if (setq
        *InventApp*
         (vlax-get-or-create-object "Inventor.Application")
      ) ;_ end of setq
    (progn


      (if (= :vlax-false (vlax-get-property *InventApp* 'Visible))
        (vlax-put-property *InventApp* 'Visible :vlax-true)

      ) ;_ end of if
      (vlax-put-property *InventApp* 'SilentOperation :vlax-true)
      (setq
        *InventDcs*
         (vlax-get-property *InventApp* 'Documents)
      ) ;_ end of setq
      (setq *ActiveIDc*
             (vlax-invoke-method
               *InventDcs* 'Add 12290 "" :vlax-true) ;_ end of vlax-invoke-method
 ;_ end of vlax-invoke-method

      ) ;_ end of setq



      (alert  (strcat "\nInventor.Application: name Document " (vlax-get-property *ActiveIDc* 'displayName))
        
      ) ;_ end of alert


    ) ;_ end of progn
  ) ;_ end of if


 ;_ end of if










  (princ)
) ;_ end of defun
;|«Visual LISP© Format Options»
(72 2 50 2 T "end of " 60 9 1 0 0 nil T nil T)
;*** DO NOT add text below the comment! ***|;

 

 

 

1.gif

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report