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

move / copy

  • Thread starter Thread starter braunfish
  • Start date Start date

braunfish

Guest
I would like to be able to move a component of a certain value on the 3 axes, but I don't think you can.
the alternative could be to use a matrix, but then be able to "explode" it and lock the components in place. is it possible to do this?
 
I would like to be able to move a component of a certain value on the 3 axes, but I don't think you can.
the alternative could be to use a matrix, but then be able to "explode" it and lock the components in place. is it possible to do this?
if I have understood you can use normal constraints by setting a max and a min displacement on the bond
 
No. I try to explain myself better.

Suppose we have some piece of a set (a plate for example) in a certain position.
I want to insert two more equals, so that they are aligned, a 20 cm later and a 40 cm further back.
How do I do that?
 
you need a part that contains a serial (rentangle) processing to which you will aggance the particular series together.
I try to explain better: position a part (skeleton), in which you create a 1st point, then create a 3d sketch and find your 2nd point, pull a line between the 2 points. go out of the sketch and make a rectangular series of the 1st point long the line just created and as n° of entity from the 2 or whatever you want and as distance from the curve length. Get out and save. so you have your skeleton part with a serial processing to which you will attach the series of your plate in the axieme.
I would do so then if someone has other ideas well come....:finger:
 
If you have an already inserted plate you can go with the cursor in the browser on the plate title, press the ctrl tasate and drag the cursor into the screen, you get a copy of the plate. at this point you can give alignment constraints with the desired distances.

Did I get the question wrong?
 
copying and reviving is the canonical solution.

to be able to move by keyboard of values (e.g. x +200, y -200, z +00) would avoid having to re-win
 
copying and reviving is the canonical solution.

to be able to move by keyboard of values (e.g. x +200, y -200, z +00) would avoid having to re-win
make two series in the environment together with your plate, the first series with the value 20 cm with positive shift and the second of 40 cm with negative shift (put the sign "-" in front of the value 40 in the "series" dialog box).

of course you will select the same plate to get the two series.

Bye.
 
but normally binding on the three floors (or other points of reference),
giving as value of user parameters that then you go to vary as desired by the parameters table?
That sounds very fast.
Or maybe I don't know what you want to do? :confused:
 
vicular is fine, only that it is slower to put every time three constraints than to make a move/copy as in other software.
if I have to copy a piece 25 times by moving me we suppose only in x but always of different values (type 100, 120, 80, 75, 45, 120, ec...) and I have to reinvigorate, I have to put 25x3=75 constraints!
 
vicular is fine, only that it is slower to put every time three constraints than to make a move/copy as in other software.
if I have to copy a piece 25 times by moving me we suppose only in x but always of different values (type 100, 120, 80, 75, 45, 120, ec...) and I have to reinvigorate, I have to put 25x3=75 constraints!
Right! then, at the time, use the "series" command and cover the object in x for all the values you want, e.g., do the first series with value 100 by selecting the original component. then do the second series, this time by selecting the serialized/copyed component and giving it as value 120 and so on, having the kindness to select for each new series, the last selected component of the previous series.

That's what you should do.
 
But you tried to do what you say?
Of course it works, but you're right because I forgot to list an important step and that is: Before selecting the last item of the series, you have to go to the browser and click the dx button on the last item, then from the context menu select "independent".

doing so when you select it to create another series, select only the last and not even the original element that otherwise, not making it independent, would also be selected because the command does not recognize it as a single, but as part of the series and therefore selected regardless.

I tried and it works. If you want to make it "dependent" again, just click the dx button and uncheck "independent".

But wait... I tried to drag the serialized components with the mouse and move, so it's not good for what you want to do.
the only way I think, is to create all the series you need by tricking you if you also select the previous components and then go to suppress the instances you don't care about in the browser with the right mouse button.
so doing, all copies or instances are blocked in their location. then if there is another road I don't know. I would do that.
 
but you lose all the constraints and you find it "fluctuating", nothing is enough and moves, it seems a little practical solution.
 
but you lose all the constraints and you find it "fluctuating", nothing is enough and moves, it seems a little practical solution.
in fact I noticed and I added a possible solution in my previous post a few minutes ago. Try to check if it appeared, in case the post.
 
but you lose all the constraints and you find it "fluctuating", nothing is enough and moves, it seems a little practical solution.
in fact I noticed and I added a possible solution in my previous post a few minutes ago. Try to check if it appeared, in case the post.
The idea of arzigolo is good.:smile:
to overcome the loss of bond, you can put the tick "fixed" to the first element, it is automatically placed to the other elements.
It should be said that it's okay only if you don't have to move the whole series.
rather a defect:
a series of the last element is always made, not the first.
so if you move the element, which I know, of the series n° 3, you also move to cascade the elements created with success series.
Sure, if the good inventor developers thought about solving small problems like a "series at different distances" rather than making us happy with filigree display....:36_1_10:
 
The idea of arzigolo is good.:smile:
to overcome the loss of bond, you can put the tick "fixed" to the first element, it is automatically placed to the other elements.
It should be said that it's okay only if you don't have to move the whole series.
rather a defect:
a series of the last element is always made, not the first.
so if you move the element, which I know, of the series n° 3, you also move to cascade the elements created with success series.
Sure, if the good inventor developers thought about solving small problems like a "series at different distances" rather than making us happy with filigree display... .
ahahah.. true!:4425:
Of course, it's not exactly a nice solution that I proposed, it doesn't even like me because it's up to being there to suppress all the instances that don't interest and it's barber to look for them in the browser tree.

but as you rightly say, couldn't they do so that you could only select a component of the series without having to untie them all by force?
and say that we have come to the 2012 version, but what are waiting to insert these small improvements that then so small are not and that they simplify not little the life of us designers? 2020 version? solidworks for example, if you select the last component of the series to create another one, select only that and not the original component with any instanze. in this sense it is done better.
I don't really know what they're waiting for. What is the white beard?:36_1_28:
 
questa macro, da copiare nel vba default.ivb (progetto applicazione) dovrebbe fare quanto richiesto ovvero:
- selezioni qualcosa nell'assieme;
- ne fa una copia e la sovrappone all'elemento selezionato;
- crea i vincoli tra i piani origine degli elementi;
- chiede il delta da applicare (il valore da piazzare nel vincolo)

ho fatto dei test veloci, mi pare funzioni.
provate e ditemi.

public sub moveoccurrence()
' set a reference to the assembly
dim oassy as assemblydocument
set oassy = thisapplication.activeeditobject

' set a reference to the assembly component definintion.
dim oasmcompdef as assemblycomponentdefinition
set oasmcompdef = oassy.componentdefinition

' get an occurrence from the select set.
on error resume next
dim oocc as componentoccurrence
dim oocccpy as componentoccurrence

set oocc = thisapplication.commandmanager.pick(kassemblyoccurrencefilter, "scegli un elemento")

' get the current transformation matrix from the occurrence.
dim otransform as matrix
set otransform = oocc.transformation

dim omove as matrix
dim oorig as matrix
set oorig = oocc.transformation

set oocccpy = oasmcompdef.occurrences.addbycomponentdefinition(oocc.definition, oocc.transformation)

call alignoccurrenceswithconstraints(oassy, oocc, oocccpy)
end sub


public sub alignoccurrenceswithconstraints(oassy as assemblydocument, oocc1 as componentoccurrence, oocc2 as componentoccurrence)

dim basexy as workplane
dim baseyz as workplane
dim basexz as workplane
call getplanes(oocc1, basexy, baseyz, basexz)

dim constraints as assemblyconstraints
set constraints = oassy.componentdefinition.constraints

' move it to the base occurrence so that if the base is
' not fully constrained it shouldn't move when the flush
' constraints are added.
oocc2.transformation = oocc1.transformation

' get the planes from the occurrence
dim occplanexy as workplane
dim occplaneyz as workplane
dim occplanexz as workplane
call getplanes(oocc2, occplanexy, occplaneyz, occplanexz)

' add the flush constraints.
call constraints.addflushconstraint(basexy, occplanexy, inputbox("delta x =", 0))
call constraints.addflushconstraint(baseyz, occplaneyz, inputbox("delta y =", 0))
call constraints.addflushconstraint(basexz, occplanexz, inputbox("delta z =", 0))

end sub

' utility function used by the alignoccurrenceswithconstraints macro.
' given an occurrence it returns the base work planes that are in
' the part or assembly the occurrence references. it gets the
' proxies for the planes since it needs the work planes in the
' context of the assembly and not in the part or assembly document
' where they actually exist.
private sub getplanes(byval occurrence as componentoccurrence, _
byref basexy as workplane, _
byref baseyz as workplane, _
byref basexz as workplane)
' get the work planes from the definition of the occurrence.
' these will be in the context of the part or subassembly, not
' the top-level assembly, which is what we need to return.
set basexy = occurrence.definition.workplanes.item(3)
set baseyz = occurrence.definition.workplanes.item(1)
set basexz = occurrence.definition.workplanes.item(2)

' create proxies for these planes. this will act as the work
' plane in the context of the top-level assembly.
call occurrence.creategeometryproxy(basexy, basexy)
call occurrence.creategeometryproxy(baseyz, baseyz)
call occurrence.creategeometryproxy(basexz, basexz)
end sub
 
to help those who do not know how and where to copy:
- alt-f11 to access chermata vba (visual basic for application)
- as you will see at the top left there is a panel, expand project application (non document project) subfolder modules
- there should already be module1 (you can insert or import others as you see in the menu in the attached figure)
- double click on module1 and make a copy and paste of the macro mail. if everything goes well the code will be black and green comments, red rows have problems (type badly copied)
- customise user commands to have a button that activates the macro.

Hello, everyone!
 

Attachments

  • Schermo 1.webp
    Schermo 1.webp
    138.1 KB · Views: 9

Forum statistics

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

Members online

No members online now.
Back
Top