• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

macro

  • Thread starter Thread starter BRM
  • Start date Start date

BRM

Guest
good morning to all I would like to begin to understand how the macros of solid edge work, I know that you use vb language but I would like to know to start as I find the names of the various commands of solid edge type what is hidden behind the menu buttons. I saw the programmer manual but how do you start?
help.
 
hi, I'm not a programmer but the thing I might recommend is to recreate the examples that are in that manual, or to recreate and then edit the examples that you find by default in the installation of solid edge.

c:\program files\solid edge ?? ?

I also refer you to this part of the specific macro forum http://www.cad3d.it/forum1/showthread.php?t=18898 where you can also find links to sites that talk about it.

Hi.
 
good morning to all I would like to begin to understand how the macros of solid edge work, I know that you use vb language but I would like to know to start as I find the names of the various commands of solid edge type what is hidden behind the menu buttons. I saw the programmer manual but how do you start?
help.
There's solid edge spy software on jason newell's website, try to see if it's still available for free.
http://www.jasonnewell.net/products/solid-edge-spy.html
 
brm: Do you have a development environment? Have you ever chewed about programming?

much depends on your goal, you can program many (but there is no simple one).

Notepad, excel vba, visual studio express or sharpdevelop.

languages: vb, c#, ... I also tried 'lua' (require luacom to connect via com a solidedge)

to start reading my posts a little.
Here are my examples: http://www.cad3d.it/forum1/showpost.php?p=263656&postcount=19

ciao
 
I decided to use vb.net I created a macro that loads the dfts through the code but I struggle to find the solid edge commands I would like it to open the dfts with the views disabled but I don't know how to call the command.
Thank you.
 
thanks to the answer I see it works but it seems to me that the views are disabled after the opening of the dft.
I set up in the window open "disabled drawing views during revision" and when I open a dft in a classic way it takes little time while if I open it with the macro it takes a little more time and tells me that the views are not updated and then I assume that they are disabled after opening.
I think something doesn't work as it should.
Thank you.
 
Hi to all I created a macro to load dfts and print them and I would like to insert a text in the chart but I can't understand which command you use I wanted to use the caller command without the arrow but I can't figure out how the syntax of commands works and how they work.
Thank you.
 
usually puts (by hand) on the template the text recall that recalls a custom property (e.g.: %{description} , %{code} , ...),
then via macro you change the custom property, update the texts and print. (for custom properties I can help you to upgrade no).

If, however, as I imagine, you already have so many designs saved without the recall you want to add the call.
Write me the name of the command you use so I can first find it.

What development environment do you use? excel vba is not good if you want to read/set the position of the baloon: returns a type of data compatibility error
 
inside the solid edge guides there is the programming guide, no or the maximum but there are all the available methods, and examples for which just paste copy.

then you should not imagine having the "commands" of solid edge, but the programming acts at a slightly lower level, to explain to me it is composed if each button of solid edge recalls a small macro.

to insert a booster in draft if I don't remember badly you have to look for the balloon method, because for solid edge calls and balls are the same thing, but displayed differently.
 
use visual basic 2008 express, I thought I was using callout callout callout command.
I tried to load some examples from the manual for the balloons but nothing does not work.
Thank you.
 
use visual basic 2008 express, I thought I was using callout callout callout command.
I tried to load some examples from the manual for the balloons but nothing does not work.
Thank you.
If you bring back the code line you wrote and the error you might want to help.

Hi.
 
questo è l'esempio che ho provato

module module1
sub main()
dim objapp as solidedgeframework.application
dim objdoc as solidedgedraft.draftdocument
dim objsheet as solidedgedraft.sheet
dim objballoons as solidedgeframeworksupport.balloons
dim objballoon as solidedgeframeworksupport.balloon
dim objbitem as solidedgeframeworksupport.balloon
' report errors
'const pi = 3.14159265358979
' create/get the application with specific settings
'on error resume next
objapp = getobject(, "solidedge.application")
'if err() then
'err.clear()
'objapp = createobject("solidedge.application")
'objdoc = objapp.documents.add("solidedge.draftdocument")
'objapp.visible = true
'else
objdoc = objapp.activedocument
'end if
' getting the active sheet object
objsheet = objdoc.activesheet
' getting the balloons collection object on the active sheet
objballoons = objsheet.balloons
' adding a balloon on the active sheet
objballoon = objballoons.add(x1:=0.25, y1:=0.25, z1:=0)
' getting another reference to the same balloon in the balloons collection object
objbitem = objballoons.item("1")
' user display
' release objects
objapp = nothing
objdoc = nothing
objsheet = nothing
objballoons = nothing
objballoon = nothing
objbitem = nothing
end sub
end module

se ho capito bene dovrebbe disegnare un pallino con il numero 1 ma non fa nulla.
grazie
 
questo è l'esempio che ho provato

module module1
sub main()
dim objapp as solidedgeframework.application
dim objdoc as solidedgedraft.draftdocument
dim objsheet as solidedgedraft.sheet
dim objballoons as solidedgeframeworksupport.balloons
dim objballoon as solidedgeframeworksupport.balloon
dim objbitem as solidedgeframeworksupport.balloon
' report errors
'const pi = 3.14159265358979
' create/get the application with specific settings
'on error resume next
objapp = getobject(, "solidedge.application")
'if err() then
'err.clear()
'objapp = createobject("solidedge.application")
'objdoc = objapp.documents.add("solidedge.draftdocument")
'objapp.visible = true
'else
objdoc = objapp.activedocument
'end if
' getting the active sheet object
objsheet = objdoc.activesheet
' getting the balloons collection object on the active sheet
objballoons = objsheet.balloons
' adding a balloon on the active sheet
objballoon = objballoons.add(x1:=0.25, y1:=0.25, z1:=0)
' getting another reference to the same balloon in the balloons collection object
objbitem = objballoons.item("1")
' user display
' release objects
objapp = nothing
objdoc = nothing
objsheet = nothing
objballoons = nothing
objballoon = nothing
objbitem = nothing
end sub
end module

se ho capito bene dovrebbe disegnare un pallino con il numero 1 ma non fa nulla.
grazie
have you added references to solid edge libraries?

so to the eye then it seems vb6 and not vb.net, if you have office use the vba of excel to try the code.

Hi.
 
it has vb6 I copied it in vb2008 express launch and does not give me errors but does nothing in the open dft.
 
test this (works on vba/excell)
Unlike yours, I put "set " in front of the assignment of objects.
the reference of the call you want is executed during the creation of the ball.
Code:
sub testbaloon()
    dim objapp as solidedgeframework.application
    dim objdoc as solidedgedraft.draftdocument
    dim objsheet as solidedgedraft.sheet
    dim objballoons as solidedgeframeworksupport.balloons
    dim objbitem as solidedgeframeworksupport.balloon
    
    ' report errors
    const pi = 3.14159265358979
    ' create/get the application with specific settings
    on error resume next
    set objapp = getobject(, "solidedge.application")
    if err then
        err.clear
        set objapp = createobject("solidedge.application")
        set objdoc = objapp.documents.add("solidedge.draftdocument")
        objapp.visible = true
    else
        set objdoc = objapp.activedocument
    end if
    ' getting the active sheet object
    set objsheet = objdoc.activesheet
    ' getting the balloons collection object on the active sheet
    set objballoons = objsheet.balloons
    ' adding a balloon on the active sheet
    set objbitem = objballoons.add(x1:=0.025, y1:=0.025, z1:=0)
    objbitem.balloontext = "ciao"
    
    ' user display
    ' release objects
    set objapp = nothing
    set objdoc = nothing
    set objsheet = nothing
    set objballoons = nothing
end sub
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top